Skip to content

v0.11.0

Compare
Choose a tag to compare
@smaye81 smaye81 released this 29 Jun 14:27
· 295 commits to main since this release
5d6dc65

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

Full Changelog: v0.10.1...v0.11.0