@clickup/rest-client
Version:
A syntax sugar tool around Node fetch() API, tailored to work with TypeScript and response validators
11 lines • 592 B
TypeScript
import type RestOptions from "../RestOptions";
import type RestResponse from "../RestResponse";
/**
* The general idea is that we turn all logical errors into exceptions and then
* deal with exceptions only. I.e. throwing an exception becomes an internal API
* convention for errors. This is because fetch() throws its own exceptions, and
* also there may be some exceptions during validation of the response, or
* inside a middleware etc.
*/
export default function throwIfErrorResponse(options: RestOptions, res: RestResponse): void;
//# sourceMappingURL=throwIfErrorResponse.d.ts.map