UNPKG

@emartech/escher-request

Version:
21 lines (20 loc) 589 B
"use strict"; 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;