feat(backend): Eigen error handler toegevoegd.
Hiervoor was ook refactoring aan de exception-klassen nodig.
This commit is contained in:
parent
bc94b25a6a
commit
aaa71aa648
14 changed files with 103 additions and 55 deletions
10
backend/src/exceptions/unauthorized-exception.ts
Normal file
10
backend/src/exceptions/unauthorized-exception.ts
Normal file
|
@ -0,0 +1,10 @@
|
|||
import {ExceptionWithHttpState} from "./exception-with-http-state.js";
|
||||
|
||||
/**
|
||||
* Exception for HTTP 401 Unauthorized
|
||||
*/
|
||||
export class UnauthorizedException extends ExceptionWithHttpState {
|
||||
constructor(message: string = 'Unauthorized') {
|
||||
super(401, message);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue