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

Named validation errors #406

Closed
TRowbotham opened this issue Jul 27, 2018 · 3 comments
Closed

Named validation errors #406

TRowbotham opened this issue Jul 27, 2018 · 3 comments
Labels
clarification Standard could be clearer topic: validation Pertaining to the rules for URL writing and validity (as opposed to parsing)

Comments

@TRowbotham
Copy link
Contributor

It would be neat if the URL parser had named validation errors like what was done for the HTML Tokenizer in whatwg/html#2701.

@annevk annevk added topic: parser clarification Standard could be clearer labels Aug 2, 2018
@domenic domenic added topic: validation Pertaining to the rules for URL writing and validity (as opposed to parsing) and removed topic: parser labels Mar 4, 2020
@annevk
Copy link
Member

annevk commented May 5, 2020

FWIW, I'd be supportive of someone adding this to the standard and will happily help out with review.

@TRowbotham
Copy link
Contributor Author

I have this mostly done. I'll try to finish it up and post something for review.

@alercah
Copy link

alercah commented Sep 2, 2022

My 2c: This is an excellent example of an issue for which my opinion changes depending on whether this is in the context of a spec for a data format (the URL string) or for an API (the web API exposed by browsers).

In any particular API, I think named errors are excellent, and I would support adding them to the web API. By contrast, it's not immediately clear to me that there would be value in trying to define these errors on the data format that is a URL string, as the exact manner of error handling is something typically left to an implementation decision, particularly given that error handling is often a context specific and language specific thing. For instance, error design for human consumption and for programmatic use often differ, and I think that the URL format should be agnostic to such concerns.

annevk pushed a commit to TRowbotham/url that referenced this issue Jan 13, 2023
annevk pushed a commit to TRowbotham/url that referenced this issue Jan 20, 2023
annevk pushed a commit to TRowbotham/url that referenced this issue Feb 10, 2023
@annevk annevk closed this as completed in d84610f Feb 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clarification Standard could be clearer topic: validation Pertaining to the rules for URL writing and validity (as opposed to parsing)
Development

Successfully merging a pull request may close this issue.

4 participants