diff --git a/disco/api/http.py b/disco/api/http.py index dfa356d..088b69e 100644 --- a/disco/api/http.py +++ b/disco/api/http.py @@ -143,9 +143,14 @@ class APIException(Exception): """ def __init__(self, response, retries=None): self.response = response + self.retries = retries + self.code = 0 self.msg = 'Request Failed ({})'.format(response.status_code) + if self.retries: + self.msg += " after {} retries".format(self.retries) + # Try to decode JSON, and extract params try: data = self.response.json()