New issue
Advanced search Search tips

Issue 812326 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Mar 2018
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Feature



Sign in to add a comment

Lock API - DomException should be AbortError?

Project Member Reported by ralp...@google.com, Feb 14 2018

Issue description

When the lock request is aborted via the AbortController, the promise is rejecting with DomException. Should that be a specific AbortError instead? Also for stealing, should that also be a special error LockStolenError?
 

Comment 1 by jsb...@chromium.org, Feb 14 2018

AbortError is a specific DOMException. The spec will say things like "reject promise with an "AbortError" DOMException."

https://heycam.github.io/webidl/#aborterror

And we're generally avoiding introducing new types of errors, but if distinguishing the "steal" case is critical we can consider it.

Comment 2 by jsb...@chromium.org, Feb 14 2018

Labels: -Type-Bug Type-Feature
Status: Assigned (was: Untriaged)

Comment 3 by ralp...@google.com, Feb 14 2018

So error.name will be set to 'AbortError'? As long as there is a  way to differentiate a generic error from an abort that should be fine.

We could punt on the steal error until we get more feedback about it.

Comment 4 by jsb...@chromium.org, Feb 14 2018

> So error.name will be set to 'AbortError'? 

Yes. 
Status: WontFix (was: Assigned)
I'll open a github issue for the "should we have a specific error for the stealing case?" question.

Sign in to add a comment