@owlnext/heimdall-js-native
Version:
Heimdall API client & utils for react native technologies
20 lines • 557 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class ErrorPayload {
constructor(responseObj) {
this._code = responseObj.response.status;
this._type = responseObj.toString();
this._message = responseObj.response.data['hydra:description'] || 'An error occurred.';
}
get code() {
return this._code;
}
get type() {
return this._type;
}
get message() {
return this._message;
}
}
exports.default = ErrorPayload;
//# sourceMappingURL=error-payload.js.map