EvalueTonSavoir/server/__mocks__/AppError.js

12 lines
290 B
JavaScript
Raw Permalink Normal View History

2024-10-01 11:30:26 -04:00
class AppError extends Error {
constructor(message, statusCode) {
super(message);
this.statusCode = statusCode || 500;
Object.setPrototypeOf(this, new.target.prototype);
Error.captureStackTrace(this, this.constructor);
2024-10-01 11:30:26 -04:00
}
}
2024-10-01 11:30:26 -04:00
module.exports = AppError;