node-enterprise-starter
Version:
<h1 align="center">Node Enterprise Starter</h1>
17 lines (13 loc) • 330 B
text/typescript
class AppError extends Error {
public statusCode: number;
constructor(statusCode: number, message: string, stack = '') {
super(message);
this.statusCode = statusCode;
if (stack) {
this.stack = stack;
} else {
Error.captureStackTrace(this, this.constructor);
}
}
}
export default AppError;