Skip to main content
zerotal

Documentation


Documentation / @zerotal/core / lock / LockNotAcquiredError

Class: LockNotAcquiredError

Defined in: lock/errors.ts:12

Thrown when a lock cannot be acquired: immediately by try/Lock.try when the key is busy, or by block/Lock.block when the wait timeout elapses. Carries the contended key and maps to HTTP 409 (code E_LOCK_NOT_ACQUIRED).

Extends

Constructors

Constructor

new LockNotAcquiredError(key): LockNotAcquiredError

Defined in: lock/errors.ts:16

Parameters

key

string

Returns

LockNotAcquiredError

Overrides

ZerotalError.constructor

Properties

code

readonly code: string

Defined in: errors/ZerotalError.ts:18

Inherited from

ZerotalError.code


status

readonly status: number = 500

Defined in: errors/ZerotalError.ts:19

Inherited from

ZerotalError.status


context?

readonly optional context?: Record<string, unknown>

Defined in: errors/ZerotalError.ts:20

Inherited from

ZerotalError.context


key

readonly key: string

Defined in: lock/errors.ts:14

The lock key that could not be acquired.