💄 Update HTTP error toast text

This commit is contained in:
itskovacs 2025-11-09 19:20:08 +01:00
parent f4ecacf0c8
commit 310b4db455

View File

@ -54,7 +54,12 @@ export const Interceptor = (req: HttpRequest<unknown>, next: HttpHandlerFn): Obs
const errDetails = ERROR_CONFIG[err.status]; const errDetails = ERROR_CONFIG[err.status];
if (errDetails) { if (errDetails) {
console.error(err); console.error(err);
return showAndThrowError(errDetails.title, `${err.error?.detail || err.message || errDetails.detail}`); let msg = ""
msg = err.message || errDetails.detail;
if (!Array.isArray(err.error?.detail)) {
msg = err.error.detail;
}
return showAndThrowError(errDetails.title, msg);
} }
if (err.status == 401 && authService.accessToken) { if (err.status == 401 && authService.accessToken) {