@emartech/escher-request
Version:
Requests with Escher authentication
21 lines (20 loc) • 589 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.EscherRequestError = void 0;
class EscherRequestError extends Error {
constructor(message, code, response, originalCode) {
super(message);
this.code = code;
this.originalCode = originalCode;
this.name = 'EscherRequestError';
if (response) {
this.data = response.data || response;
}
else {
this.data = {
replyText: message
};
}
}
}
exports.EscherRequestError = EscherRequestError;