Inflate all server responses
nbibler opened this issue · 1 comments
nbibler commented
In the current version, v1.0.4, rest-client will only attempt to inflate the server response for HTTP 2XX
(success-based) responses. This behavior is unexpected and counter-to the Rails convention of providing Error
details in HTTP 422
(Unprocessable Entity
) - or at least non-200
- responses.
The offending code can be found here, in today's source. As you can see, deflate
is only executed for successful responses, whereas unsuccessful responses just get stuffed - while still deflated - into the response, rendering the exception.response.body generally unusable.