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

Addressable::Template#match raises Addressable::URI::InvalidURIError on invalid string #414

Open
ojab opened this issue Apr 12, 2021 · 0 comments

Comments

@ojab
Copy link
Contributor

ojab commented Apr 12, 2021

> Addressable::Template.new('https://{domain}').match('x;x:x')
# => …/gems/addressable-2.7.0/lib/addressable/uri.rb:901:in `scheme=': Invalid scheme format: x;x (Addressable::URI::InvalidURIError)

Not sure if it's a bug, but I don't see that .match could raise documented anywhere and IMHO there is an expectation to have nil on any data that doesn't match the template, not only on valid URIs.

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

2 participants