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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add validations for options #487

Open
antedeguemon opened this issue Apr 9, 2024 · 0 comments
Open

Add validations for options #487

antedeguemon opened this issue Apr 9, 2024 · 0 comments

Comments

@antedeguemon
Copy link
Contributor

Hey folks! 馃枛

Thanks for the excellent library, httpoison is awesome.

I ran into an issue where all my requests were failing with the checkout_failure error reason. After some debugging, I found that the timeout option I was passing to httpoison was accidentally set to a stringfied integer instead of an integer.

So I had the idea of adding some sort of options validation to HTTPoison. The validation would make the error I had much easier to see since it is not obvious that a string will be interpreted as 0.

I think the easiest approach to implement it would be to use dashbitco/nimble_options.

This would obviously be an enhancement and not a bugfix, but IMO it would be nice to have because it will hopefully save developers time with debugging.

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

1 participant