Skip to content

Commit

Permalink
fix(shippy): print 5xx error code returned from server
Browse files Browse the repository at this point in the history
  • Loading branch information
ericswpark committed May 23, 2024
1 parent 8b73622 commit 5581284
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shippy/shippy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ def _request(self, type, url, headers=None, data=None, files=None):

# Check for temporary server-side errors
if int(r.status_code / 100) == 5:
print(SERVER_ERROR_WAITING_MSG)
print(SERVER_ERROR_WAITING_MSG.format(r.status_code))
wait_temporary_error(30)

return self._request(
Expand Down
2 changes: 1 addition & 1 deletion shippy/shippy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
"resume uploading in {} seconds."
)

SERVER_ERROR_WAITING_MSG = "The server is temporarily unavailable."
SERVER_ERROR_WAITING_MSG = "The server is temporarily unavailable. Error code: {}"
SERVER_ERROR_WAIT_STATUS_MSG = (
"Waiting to resume as the server is temporarily unavailable. "
"shippy will automatically retry in {} seconds."
Expand Down

0 comments on commit 5581284

Please sign in to comment.