lightrail-client
Version:
A Javascript and Typescript client for Lightrail
16 lines (15 loc) • 612 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.LightrailRequestError = void 0;
class LightrailRequestError extends Error {
constructor(response) {
super((response.body && response.body.message) || response.text);
this.isLightrailRequestError = true;
this.status = response.status;
this.messageCode = (response.body && response.body.messageCode) || null;
this.body = response.body;
this.method = response.error.method;
this.path = response.error.path;
}
}
exports.LightrailRequestError = LightrailRequestError;