past behavior.
If you set self._simplify_error_response to False, error responses
with a JSON body will be deserialized and returned in their entirety.
If you do nothing, error responses will be reduced down to the error
message, as they have been for years. That seems less disruptive.
to an attribute. It increases probability that engineers set it right.
A misspelled dictionary key may not have an immediately obviously effect,
but a misspelled attribute will throw a runtime exception.
Only handle OSError and httpclient.HTTPError.
- We can assume any instance of httpclient.HTTPError is a failure
unrelated to the status code of the response. This is due to
sprockets.mixins.http setting `raise_error=False` when making the
request.
- ConnectionError and socket.gaierror are both instances of OSError
- CurlError is an instance of tornado.httpclient.HTTPError
- Other instances of tornado.httpclient.HTTPError include
HTTPTimeoutError and HTTPStreamClosedError
Also needed to fix the instance assertions in the test. It was always
true as it was evaluating the truthyness of a list - not the isinstance
values.
- Add ``history`` attribute of the response with all response objects
- Add ``links`` attribute of the response with the parsed link header if set
- Change logging level in a few places to a more appropriate level
- Add support for rejected consumers when auto-creating the ``User-Agent`` header
- Add the netloc of a request to the log entry created when rate limited
- Use RequestHandler.settings instead of RequestHandler.application.settings
when auto-creating the ``User-Agent`` header for a Tornado request handler
- Add test coverage of the Warning response header behavior