v0.11.0
What's Changed
Disregard non-JSON error response bodies for unary requests
This release makes a change in how response bodies are parsed for Connect unary requests that result in an HTTP error. Previously, all response bodies for unary requests that returned an HTTP error status were parsed with response.json()
. However, this could lead to errors with non-JSON bodies. Now, only responses with a Content-Type
of application/json
will have the body parsed as JSON and added to the resulting Connect error.
For all other errors, the resulting Connect error will show the HTTP status code as the message and the corresponding Connect error code as the code.
To reiterate, this only affects Connect protocol unary requests that end with an HTTP error status code. All other protocols and/or RPC types are unaffected.
Enhancements
New Contributors
- @akosyakov made their first contribution in #686
Full Changelog: v0.10.1...v0.11.0