Skip to content

Commit 454987d

Browse files
authored
Merge pull request #508 from agdsn/b/api-error-handling
fixed error api handling
2 parents 7efa49c + f98b759 commit 454987d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sipa/model/pycroft/api.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ def _do_api_call(
257257
extra={'data': {'endpoint': self._endpoint + url}})
258258
raise PycroftBackendError("Pycroft API unreachable") from e
259259

260-
if response.status_code not in [200, 400, 401, 403, 404, 412, 422]:
260+
if response.status_code not in [200, *range(400, 500)]:
261261
try:
262262
response.raise_for_status()
263263
except HTTPError as e:

0 commit comments

Comments
 (0)