Skip to content

Commit

Permalink
feat: add statusCode to exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Dani Reinón committed Apr 28, 2022
1 parent 688cfc7 commit 6923975
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion storage3/_async/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ async def _request(
try:
response.raise_for_status()
except HTTPError:
raise StorageException(response.json())
raise StorageException({**response.json(), "statusCode": response.status_code})

return response

Expand Down
2 changes: 1 addition & 1 deletion storage3/_async/file_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ async def _request(
try:
response.raise_for_status()
except HTTPError:
raise StorageException(response.json())
raise StorageException({**response.json(), "statusCode": response.status_code})

return response

Expand Down
2 changes: 1 addition & 1 deletion storage3/_sync/bucket.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def _request(
try:
response.raise_for_status()
except HTTPError:
raise StorageException(response.json())
raise StorageException({**response.json(), "statusCode": response.status_code})

return response

Expand Down
2 changes: 1 addition & 1 deletion storage3/_sync/file_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def _request(
try:
response.raise_for_status()
except HTTPError:
raise StorageException(response.json())
raise StorageException({**response.json(), "statusCode": response.status_code})

return response

Expand Down

0 comments on commit 6923975

Please sign in to comment.