From 8e56d68793ba5a7d903e4481cdf7fa94e6cbf4e9 Mon Sep 17 00:00:00 2001 From: Gerald Schmittinger Date: Mon, 31 Mar 2025 16:25:32 +0200 Subject: [PATCH] feat(backend): Exception voor HTTP-foutcodes --- frontend/src/exception/http-error-response-exception.ts | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 frontend/src/exception/http-error-response-exception.ts diff --git a/frontend/src/exception/http-error-response-exception.ts b/frontend/src/exception/http-error-response-exception.ts new file mode 100644 index 00000000..4999b35d --- /dev/null +++ b/frontend/src/exception/http-error-response-exception.ts @@ -0,0 +1,7 @@ +import type {AxiosResponse} from "axios"; + +export class HttpErrorResponseException extends Error { + constructor(public response: AxiosResponse) { + super(response.statusText); + } +}