@metacall/faas
Version:
Reimplementation of MetaCall FaaS platform written in TypeScript.
12 lines (11 loc) • 376 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
class AppError extends Error {
constructor(message, statusCode) {
super(message);
this.statusCode = statusCode;
this.status = `${statusCode}`.startsWith('4') ? 'fail' : 'error';
Error.captureStackTrace(this, this.constructor);
}
}
exports.default = AppError;