Re: [screen-wake-lock] Distinguish exceptions on .request() (#352)

> > The question I ask myself when thinking about this sort of thing is whether there is a different action the developer would take depending on the error.
> I'm approaching it more from "why did it fail?" instead of what action can one take (i.e., taking some of the guess work out of it, otherwise it could have failed for any reason in the spec).

That's what the message is for. If we are explaining the error to the developer then we have as many words as we want to do that. What I want to avoid is developers running regular expressions over the message string to figure out what step to take next. That's where having well-considered use of the DOMException types is important.

GitHub Notification of comment by reillyeon
Please view or discuss this issue at using your GitHub account

Sent via github-notify-ml as configured in

Received on Tuesday, 4 October 2022 00:25:00 UTC