Skip to content

Commit

Permalink
Improved HTTP error code verbosity (#927)
Browse files Browse the repository at this point in the history
  • Loading branch information
JBWilkie authored Sep 17, 2024
1 parent 0b1809e commit 4e9435d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions darwin/future/core/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ def raise_for_darwin_exception(response: requests.Response) -> None:
if response.status_code == 200:
return
if response.status_code == 400:
raise BadRequest(response)
raise BadRequest(response, response.text)
if response.status_code == 401:
raise Unauthorized(response)
raise Unauthorized(response, response.text)
if response.status_code == 404:
raise NotFound(response)
raise NotFound(response, response.text)
if response.status_code == 422:
raise UnprocessibleEntity(response)
raise UnprocessibleEntity(response, response.text)

0 comments on commit 4e9435d

Please sign in to comment.