refactor(backend): Magic values vervangen door constanten.
This commit is contained in:
parent
f2449969a7
commit
03c6ada0e5
2 changed files with 39 additions and 11 deletions
13
backend/src/exceptions.ts
Normal file
13
backend/src/exceptions.ts
Normal file
|
@ -0,0 +1,13 @@
|
|||
export class UnauthorizedException extends Error {
|
||||
status = 401;
|
||||
constructor(message: string = "Unauthorized") {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
export class ForbiddenException extends Error {
|
||||
status = 403;
|
||||
constructor(message: string = "Forbidden") {
|
||||
super(message);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue