Skip to main content

Class: StackWriteGuardError

Defined in: packages/client/src/core/guarded-db.ts:49

Raised when application code tries to write around a stack's authoring path.

Example

try {
await stack.db.bulkDocs({ docs: incoming, new_edits: false });
} catch (error) {
error instanceof StackWriteGuardError; // true
}

Extends

  • Error

Constructors

Constructor

new StackWriteGuardError(method, reason): StackWriteGuardError;

Defined in: packages/client/src/core/guarded-db.ts:54

Parameters

ParameterType
methodstring
reasonstring

Returns

StackWriteGuardError

Overrides

Error.constructor

Properties

PropertyModifierTypeDefault valueDescriptionOverridesDefined in
methodreadonlystringundefinedThe method the caller reached for.-packages/client/src/core/guarded-db.ts:52
namepublicstring"StackWriteGuardError"-Error.namepackages/client/src/core/guarded-db.ts:50