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
| Parameter | Type |
|---|---|
method | string |
reason | string |
Returns
StackWriteGuardError
Overrides
Error.constructor
Properties
| Property | Modifier | Type | Default value | Description | Overrides | Defined in |
|---|---|---|---|---|---|---|
method | readonly | string | undefined | The method the caller reached for. | - | packages/client/src/core/guarded-db.ts:52 |
name | public | string | "StackWriteGuardError" | - | Error.name | packages/client/src/core/guarded-db.ts:50 |