fix(backend): Diverse bugfixes omtrent LearningPathPage

This commit is contained in:
Gerald Schmittinger 2025-03-31 23:12:03 +02:00
parent 27b9cdf833
commit 12b9f31f5f
9 changed files with 34 additions and 33 deletions

View file

@ -1,7 +1,9 @@
import type {AxiosResponse} from "axios";
export class HttpErrorResponseException extends Error {
public statusCode: number;
constructor(public response: AxiosResponse<unknown, unknown>) {
super(response.statusText);
super((response.data as {message: string})?.message || JSON.stringify(response.data));
this.statusCode = response.status;
}
}