bolt/errors
bolt/errors
Import from @norbital-ai/bolt/errors
@norbital-ai/bolt/errors: canonical tagged errors shared by guest bodies, pages and the test kit. The guest loads a family only when an operation needs it; these reexports retain the public class identities.
decl
ActConflict class
class ActConflict extends ActConflict_base {
readonly message = "another write changed these records since they were read";
} A write that lost a race: another write changed these records since they were read.
Members
| Name | Type | Description |
|---|---|---|
message | "another write changed these records since they were read" | |
records | Schema.$Array<Schema.Struct<{ readonly model: Schema.String; readonly id: Schema.String; }>> |
Source: packages/bolt/src/decl/errors/act.ts:24
ActFailure type
type ActFailure = ActRefused | ActConflict | ActUnknown; Every way ctx.act (and a kit caller's act) fails.
Source: packages/bolt/src/decl/errors/act.ts:38
ActRefused class
class ActRefused extends ActRefused_base {
} A write refused: code is refused for an authored refusal, else the engine's code (forbidden, unique, …), with the field or rows it names and, for tenant code, the rule that refused. message is the text a person reads; an authored refusal also carries its catalogue key and placeholder values.
Members
| Name | Type | Description |
|---|---|---|
message | string | |
code | Schema.String | |
key? | Schema.optional<Schema.String> | |
values? | Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number]>>> | |
rows? | Schema.optional<Schema.$Array<Schema.Number>> | |
field? | Schema.optional<Schema.String> | |
row? | Schema.optional<Schema.Number> | |
rule? | Schema.optional<Schema.String> | |
data? | Schema.optional<Schema.Struct<{ readonly request_id: Schema.String; }>> |
Source: packages/bolt/src/decl/errors/act.ts:11
errors
FacilityFailure class
class FacilityFailure extends FacilityFailure_base {
/** Refuses invalid facility input without changing the shared tagged error identity. */
static invalid(message: string): FacilityFailure;
} A failed facility call: its kind, message, HTTP status and optional provider retry delay.
Members
| Name | Type | Description |
|---|---|---|
kind | Schema.Literals<readonly ["upstream", "timeout", "rate_limited", "invalid", "too_large", "unsupported"]> | |
message | string | |
status? | Schema.optional<Schema.Number> | |
retry_after_ms? | Schema.optional<Schema.Finite> | The provider's minimum delay before another attempt. |
Source: packages/host-api/src/errors.ts:15
decl
ProtocolFailed class
class ProtocolFailed extends /*#__PURE__*/ ProtocolFailed_base {
} An answer that is not the protocol's shape.
Members
| Name | Type | Description |
|---|---|---|
message | string |
Source: packages/bolt/src/decl/errors/browser.ts:13
ReadFailed class
class ReadFailed extends ReadFailed_base {
} A page read the engine refused: its code and message.
Members
| Name | Type | Description |
|---|---|---|
code | Schema.String | |
message | string |
Source: packages/bolt/src/decl/errors/read.ts:5
Refusal class
class Refusal extends Refusal_base {
} What ctx.refuse fails with: message is a catalogue key, values its placeholders, field names a field, and row the index of the offending row in the batch or list the body received. Bodies refuse through ctx.refuse, never by constructing it. The engine renders the key with the workspace catalogue.
Members
| Name | Type | Description |
|---|---|---|
message | string | |
values? | Schema.optional<Schema.$Record<Schema.String, Schema.Union<readonly [Schema.String, Schema.Number]>>> | |
field? | Schema.optional<Schema.String> | |
row? | Schema.optional<Schema.Number> |
Source: packages/bolt/src/decl/errors/refusal.ts:25
errors
Unavailable class
class Unavailable extends Unavailable_base {
readonly message: string;
} An optional facility with no provider bound, or an instance not paired: the facility and why.
Members
| Name | Type | Description |
|---|---|---|
message | string | |
facility | Schema.String | |
reason | Schema.String |