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
9
backend/src/exceptions/exception-with-http-state.ts
Normal file
9
backend/src/exceptions/exception-with-http-state.ts
Normal file
|
@ -0,0 +1,9 @@
|
|||
/**
|
||||
* Exceptions which are associated with a HTTP error code.
|
||||
*/
|
||||
export abstract class ExceptionWithHttpState extends Error {
|
||||
constructor(public status: number, public error: string) {
|
||||
super(error);
|
||||
}
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue