Re: [whatwg/url] Named validation errors (#406)

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.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/url/issues/406#issuecomment-1235425895
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/url/issues/406/1235425895@github.com>

Received on Friday, 2 September 2022 12:11:40 UTC