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

Better error messages for invalid URLs #565

Open
shaicoleman opened this issue Sep 10, 2019 · 1 comment · May be fixed by #723
Open

Better error messages for invalid URLs #565

shaicoleman opened this issue Sep 10, 2019 · 1 comment · May be fixed by #723
Milestone

Comments

@shaicoleman
Copy link

shaicoleman commented Sep 10, 2019

HTTP.get(nil)
HTTP::Request::UnsupportedSchemeError (unknown scheme: )

HTTP.get('')
HTTP::Request::UnsupportedSchemeError (unknown scheme: )

HTTP.get('/')
HTTP::Request::UnsupportedSchemeError (unknown scheme: )

HTTP.get(':')
Addressable::URI::InvalidURIError (Cannot assemble URI string with ambiguous path: ':')

Ideally it should return InvalidURI exceptions if the URL is invalid instead of UnsupportedSchemeError, as it is less confusing. Ideally also, it should return the same exception for all these cases

@ixti
Copy link
Member

ixti commented Sep 10, 2019

Totally agree!

@ixti ixti added this to the v5.0.0 milestone Sep 10, 2019
@skatkov skatkov linked a pull request Aug 13, 2022 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants