Skip to content

js-bao-wss-client


js-bao-wss-client / WorkflowRunError

Interface: WorkflowRunError ​

The structured error, normalized. Field for field with the Swift client's WorkflowRunError.

Properties ​

details? ​

optional details?: Record<string, unknown>

Whatever else the wire object carried, key for key and value for value. Absent when there was nothing besides name and message.

A wire details is one of these remaining keys like any other, so an object sending details: ["x"] reads here as details: { details: ["x"] } — the array is kept where it was rather than being promoted over the map it lives in.


message ​

message: string

What went wrong, and where a platform refusal's CODE is — the message leads with it (OUTPUT_SCHEMA_VIOLATION: …, OUTPUT_TOO_LARGE: …). Always present: an error the client publishes is one it can describe.


name? ​

optional name?: string

The error's own NAME, not the platform's error code. WorkflowError when the platform built the object itself; the thrown error's own name (Error for a plain throw new Error(...)) when the run engine recorded a failing handler's throw. Absent for the string form, and for an object the engine kept only the message of.

To branch on a platform refusal, read message: the code is its prefix.

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