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

Feature Proposal: Raise on some HTTP status codes #454

Closed
dccunha opened this issue Dec 21, 2015 · 2 comments
Closed

Feature Proposal: Raise on some HTTP status codes #454

dccunha opened this issue Dec 21, 2015 · 2 comments

Comments

@dccunha
Copy link

dccunha commented Dec 21, 2015

I would like if HTTParty throw an exception on some HTTP status codes. I thought in an option that would turn this feature on and define what status codes would throw exceptions.

Something like this:

class Foo
  include HTTParty
  raises_on status_codes: (400..599).to_a
end

What do you think of this? Can I send a pull request following this idea?

@dccunha dccunha changed the title Raise on some HTTP status codes Feature Proposal: Raise on some HTTP status codes Dec 21, 2015
@jnunemaker
Copy link
Owner

I'd be open to seeing a PR, but I'm not really sure I like this idea. I'd probably rather just see a layer on top at the application level or something that does this if you want it.

@jnunemaker
Copy link
Owner

Closing the issue, but thanks for the proposal and do let me know if you whip something up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants