-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
Lines 239 to 252 in f09a160
| r = self._doRequest(url, method, body, headers) | |
| retry_http_codes = [503, 504] | |
| if r.status_code in retry_http_codes and retry: | |
| tries = 5 | |
| delay = .5 | |
| backoff = 2 | |
| while r.status_code in retry_http_codes and tries > 0: | |
| tries -= 1 | |
| time.sleep(delay) | |
| delay *= backoff | |
| r = self._doRequest(url, method, body, headers) | |
| r.raise_for_status() |
The actual error message is in
response.text and can't be accessed after the raise_for_status anymore. It's hard to know on application level what went wrong if the error is just "400 bad request". It would be good if the actual error message would be part of the exception message.
After hacking the library I found out that I actually got the error message {"msg":"Message must be no more than 64k"} from ironmq. I was spending have the day searching why my request is not working.
Metadata
Metadata
Assignees
Labels
No labels