mnotify-ts-sdk
Version:
Third-Party TypeScript SDK for mNotify BMS API
26 lines • 787 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.MNotifyError = void 0;
class MNotifyError extends Error {
constructor(message, statusCode, data) {
super(message);
this.statusCode = statusCode;
this.data = data;
this.name = 'MNotifyError';
// Maintains proper stack trace for where our error was thrown
if (Error.captureStackTrace) {
Error.captureStackTrace(this, MNotifyError);
}
}
toJSON() {
return {
name: this.name,
message: this.message,
statusCode: this.statusCode,
data: this.data,
stack: this.stack
};
}
}
exports.MNotifyError = MNotifyError;
//# sourceMappingURL=MNotifyError.js.map