Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert non-200 http responses into errors #254

Merged
merged 5 commits into from
Mar 8, 2024

Conversation

prestwich
Copy link
Member

Currently non-200 responses proceed to JSON deser. This causes them to be treated as TransportError::custom variants.

Closes #253

Motivation

Prevent server errors from being treated as JSON

Solution

Capture the errors

PR Checklist

  • Added Tests
  • Added Documentation
  • Breaking changes

@prestwich prestwich added the bug Something isn't working label Mar 7, 2024
@prestwich prestwich self-assigned this Mar 7, 2024
crates/transport-http/src/hyper.rs Outdated Show resolved Hide resolved
@prestwich prestwich merged commit d66e9b8 into main Mar 8, 2024
14 checks passed
@prestwich prestwich deleted the prestwich/error-for-status branch March 8, 2024 08:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Trying to decode non 200 status code payloads as result object.
2 participants