fix: laat andere succes codes toe dan enkel 200 (nodig voor 201 created)

This commit is contained in:
laurejablonski 2025-04-06 14:33:17 +02:00
parent 609073cfba
commit fe17d92cd2

View file

@ -10,7 +10,7 @@ export abstract class BaseController {
}
private static assertSuccessResponse(response: AxiosResponse<unknown, unknown>): void {
if (response.status / 100 !== 2) {
if (response.status < 200 || response.status >= 300) {
throw new HttpErrorResponseException(response);
}
}