BETTERZON-38: Added error handler, preparation for DB accessing

This commit is contained in:
2020-11-25 00:38:16 +01:00
parent 5b04b810dc
commit 6b8acdab46
9 changed files with 1700 additions and 57 deletions
+13
View File
@@ -0,0 +1,13 @@
export default class HttpException extends Error {
statusCode: number;
message: string;
error: string | null;
constructor(statusCode: number, message: string, error?: string) {
super(message);
this.statusCode = statusCode;
this.message = message;
this.error = error || null;
}
}