Skip to content

js-bao-wss-client


js-bao-wss-client / FunctionRunError

Interface: FunctionRunError ​

Why a function run failed. The ONE structured error on this surface.

The workflow type carries two fields for this — a raw error passthrough and a normalized failure beside it — because principle 5 forbade moving a published value. This is a new type, so it has one.

Properties ​

code? ​

optional code?: FunctionRunErrorCode

The platform's classification, when it made one. The same value as FunctionRun.errorCode, lifted here so a caller reading the error does not have to also hold the run block.


details? ​

optional details?: Record<string, unknown>

Any remaining wire keys, key for key.


message ​

message: string

What went wrong. Always present: an error the client publishes is one it can describe. A platform refusal leads its message with its code.


name? ​

optional name?: string

The thrown error's own NAME, when the engine preserved one (Error, TypeError, a tenant's own class). Absent for a failure read off the persisted row — the platform keeps only the message there and labels it WorkflowError, which is a placeholder and not a name, so this client drops it — and absent whenever the engine dropped the name. Never the code: read code for that.

Documentation validated against js-bao-wss-client 3.4.0 · js-bao 0.11.0 · primitive-admin 1.0.62 · primitive-app 3.1.0 — 2026-09-30