Skip to content

Commit

Permalink
SDK-109 Proper Error Message when results unavailable (qubole#276)
Browse files Browse the repository at this point in the history
  • Loading branch information
lordozb authored and shahharsh87 committed Jun 13, 2020
1 parent 0e267aa commit bbf9daa
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions qds_sdk/connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,15 +188,12 @@ def _handle_error(response):
elif code == 422:
sys.stderr.write(response.text + "\n")
raise ResourceInvalid(response)
elif code in (502, 504):
elif code in (502, 503, 504):
sys.stderr.write(response.text + "\n")
raise RetryWithDelay(response)
elif code == 449:
sys.stderr.write(response.text + "\n")
raise RetryWithDelay(response, Connection._get_error_message(code))
elif code in (429, 503):
sys.stderr.write(response.text + "\n")
raise AlwaysRetryWithDelay(response, Connection._get_error_message(code))
raise RetryWithDelay(response, "Data requested is unavailable. Retrying ...")
elif 401 <= code < 500:
sys.stderr.write(response.text + "\n")
raise ClientError(response)
Expand Down

0 comments on commit bbf9daa

Please sign in to comment.