diff --git a/qds_sdk/connection.py b/qds_sdk/connection.py index 324c27f5..11893444 100644 --- a/qds_sdk/connection.py +++ b/qds_sdk/connection.py @@ -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)