-
Notifications
You must be signed in to change notification settings - Fork 13
Open
Description
Should there be a more specific error than an AbortError DOMException as the promise resolution when the lock is stolen? i.e.
try {
const result = await navigator.locks.request('resource', async lock => {
// ... hold for an arbitrary period, e.g. await new Promise(r => {})
});
} catch (ex) {
// anything more specific than ex.name === 'AbortError' here?
}
// elsewhere and elsewhen...
navigator.locks.request('resource', {steal: true}, lock => {});
ex.message
will have more details for logging purposes, at least.