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

Error handling #8

Open
5 tasks
joepie91 opened this issue Aug 18, 2015 · 0 comments
Open
5 tasks

Error handling #8

joepie91 opened this issue Aug 18, 2015 · 0 comments

Comments

@joepie91
Copy link
Owner

bhttp should allow for specifying a list or range of 'unacceptable' response codes (eg. 4xx, 5xx) that should be treated and thrown as errors.

  • Allow specifying an array of 'error codes'.
  • Consider what the default for this should be.
  • Investigate the best API for specifying error code ranges. Perhaps just supply a few default lists, or allow predicates?
  • Add an option for draining the response stream when errors occur (maybe this should be default and opt-out, like for keepRedirectResponses?)
  • Investigate how to deal with encodeJSON for error responses; not all APIs consistently return JSON in case of errors (eg. Tahoe-LAFS, which can return plain text), and perhaps bhttp should be more lenient on this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant