feat(frontend): Navigatie voor leerpad geïmplementeerd.
This commit is contained in:
parent
3c3fddb7d0
commit
07340de2e3
13 changed files with 216 additions and 54 deletions
22
frontend/src/services/api-client/api-exceptions.ts
Normal file
22
frontend/src/services/api-client/api-exceptions.ts
Normal file
|
@ -0,0 +1,22 @@
|
|||
import type {AxiosResponse} from "axios";
|
||||
|
||||
export class HttpErrorStatusException extends Error {
|
||||
public readonly statusCode: number;
|
||||
|
||||
constructor(response: AxiosResponse<any, any>) {
|
||||
super(`${response.statusText} (${response.status})`);
|
||||
this.statusCode = response.status;
|
||||
}
|
||||
}
|
||||
|
||||
export class NotFoundException extends Error {
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
|
||||
export class InvalidResponseException extends Error {
|
||||
constructor(message: string) {
|
||||
super(message);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue