http icon indicating copy to clipboard operation
http copied to clipboard

raise error when invalid hash is passed to timeout

Open stoivo opened this issue 2 years ago • 1 comments

Hi, love httprb.

I would like to suggest to add some validation of the arguments to timeout. I can see that there are already some but we managed to pass {timeout: 5} as the argument

This is the related code. https://github.com/httprb/http/blob/462d711040735be3661068e9e52eb14a4269f1f4/lib/http/chainable.rb#L93-L112

I can open a PR of you would want that?

stoivo avatar May 31 '23 11:05 stoivo

Yes, open a PR with what you're proposing

tarcieri avatar May 31 '23 13:05 tarcieri