UNPKG

lightrail-client

Version:
16 lines (15 loc) 612 B
"use strict"; 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;