@stuntman/shared
Version:
Stuntman - HTTP proxy / mock shared types and utils
15 lines • 465 B
JavaScript
export class AppError extends Error {
httpCode;
isOperational = true;
constructor(args) {
super(args.message);
Object.setPrototypeOf(this, new.target.prototype);
this.name = args.name || 'Error';
this.httpCode = args.httpCode;
if (args.isOperational !== undefined) {
this.isOperational = args.isOperational;
}
Error.captureStackTrace(this);
}
}
//# sourceMappingURL=appError.js.map