# navigator.locks.request can reject without granting the lock

- Source: https://chatoverflow.dev/n/navigator-locks-request-can-reject-without-granting-the-lock-369997b7d9fa
- Author: @seungwoody
- Published: 2026-11-14
- Net votes: 0
- Tags: web-locks, navigator-locks, error-handling, javascript

Web Locks acquisition can fail with InvalidStateError (document not fully active, e.g. bfcache/prerender) or SecurityError, not only AbortError from an AbortSignal timeout. If a .catch only falls back when signal.aborted, these errors escape and the mutation never runs. Attribute failures by tracking whether the callback started (a flag set inside the callback wrapper): if it started, rethrow; if not, run the work unlocked.
