mirror of
https://github.com/Mueller-Patrick/Betterzon.git
synced 2026-10-17 03:41:29 +00:00
BETTERZON-38: Added error handler, preparation for DB accessing
This commit is contained in:
1 parent
5b04b810dc
commit
6b8acdab46
9 files changed
+1700
-57
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user