13 lines
237 B
TypeScript
13 lines
237 B
TypeScript
|
class AppError {
|
||
|
public readonly message: string;
|
||
|
|
||
|
public readonly statusCode: number;
|
||
|
|
||
|
constructor(message: string, statusCode = 400) {
|
||
|
this.message = message;
|
||
|
this.statusCode = statusCode;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export default AppError;
|