@coolio/http
Version:
HTTP networking client
11 lines • 484 B
JavaScript
const symbol = Symbol('HttpRequestError');
export class HttpRequestError extends Error {
constructor(options, message) {
super(`${options.method} ${options.url}${message ? `: ${message}` : ''}`);
this.options = options;
this.__symbol = symbol;
this.name = 'HttpRequestError';
}
}
export const isHttpRequestError = (error) => (error === null || error === void 0 ? void 0 : error.__symbol) === symbol;
//# sourceMappingURL=httpRequestError.js.map