Skip to content

Commit

Permalink
408 to 500 mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBurchLog committed Nov 26, 2024
1 parent a59e2f9 commit 74624e9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
Brewtils Changelog
==================

3.29.1
------
TBD

- Updated Wait Timeout Exception expected HTTP code from 408 to 500

3.29.0
------
11/25/24
Expand Down
4 changes: 2 additions & 2 deletions brewtils/rest/easy_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def handle_response_failure(response, default_exc=RestError, raise_404=True):
Raises:
NotFoundError: Status code 404 and raise_404 is True
WaitExceededError: Status code 408
WaitExceededError: Status code 500
ConflictError: Status code 409
TooLargeError: Status code 413
ValidationError: Any other 4xx status codes
Expand All @@ -79,7 +79,7 @@ def handle_response_failure(response, default_exc=RestError, raise_404=True):
raise NotFoundError(message)
else:
return None
elif response.status_code == 408:
elif response.status_code == 500 and message == "Max wait time exceeded":
raise WaitExceededError(message)
elif response.status_code == 409:
raise ConflictError(message)
Expand Down

0 comments on commit 74624e9

Please sign in to comment.