From 94a8456bdd58cb3cb9a369790d9f7bea1ac8ceab Mon Sep 17 00:00:00 2001 From: Adriaan Jacquet Date: Tue, 15 Apr 2025 19:54:43 +0200 Subject: [PATCH] feat: server error exception type toegevoegd --- backend/src/exceptions/server-error-exception.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 backend/src/exceptions/server-error-exception.ts diff --git a/backend/src/exceptions/server-error-exception.ts b/backend/src/exceptions/server-error-exception.ts new file mode 100644 index 00000000..76850a50 --- /dev/null +++ b/backend/src/exceptions/server-error-exception.ts @@ -0,0 +1,12 @@ +import { ExceptionWithHttpState } from "./exception-with-http-state"; + +/** + * Exception for HTTP 500 Internal Server Error + */ +export class ServerErrorException extends ExceptionWithHttpState { + status = 500; + + constructor(message = 'Internal server error, something went wrong') { + super(500, message); + } +}