@odata2ts/http-client-fetch
Version:
HTTP client based on fetch and consumable by odata2ts
16 lines • 639 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FetchClientError = void 0;
class FetchClientError extends Error {
constructor(message, status, headers, cause, responseData) {
// @ts-ignore: fetch requires lib "dom" or "webworker", but then the "cause" property becomes unknown to TS
super(message, { cause });
this.status = status;
this.headers = headers;
this.cause = cause;
this.responseData = responseData;
this.name = this.constructor.name;
}
}
exports.FetchClientError = FetchClientError;
//# sourceMappingURL=FetchClientError.js.map