Skip to content

Interface: ErrorMessage

Defined in: aiui-intent-runtime/src/protocol.ts:110

The generic error push — the single surface through which a server-side failure (a stale OPENAI_API_KEY failing transcription, a correction diff erroring, a degraded seam) reaches the page, instead of dying in the channel process's log. Mirrors ChannelErrorMessage in the channel package's channel.ts — the source of truth; change both together.

The client itself also synthesizes this message for transport faults it alone can see: connectIntentSocket delivers one to every onServerMessage handler when the socket closes out from under a completed hello (channel stopped, channel reloaded mid-turn). Client-detected and server-pushed errors thereby render through one UI path — the intent tool's toast column (see intent.ts).

Extends

Indexable

[key: string]: unknown

Properties

data?

optional data?: unknown

Defined in: aiui-intent-runtime/src/protocol.ts:125

Optional structured payload — the raw upstream error (API error body, WebSocket close code + reason) exactly as the server saw it. Rendered behind the toast's details expander.


detail?

optional detail?: string

Defined in: aiui-intent-runtime/src/protocol.ts:119

Optional second line: remediation, upstream error body, close reason.


kind

kind: "error"

Defined in: aiui-intent-runtime/src/protocol.ts:111

Overrides

ServerMessage.kind


message

message: string

Defined in: aiui-intent-runtime/src/protocol.ts:117

One informative human-readable sentence.


source?

optional source?: string

Defined in: aiui-intent-runtime/src/protocol.ts:115

Coarse failure category ("connection", "transcription", …) — the badge.


threadId?

optional threadId?: string

Defined in: aiui-intent-runtime/src/protocol.ts:113

The thread the failure belongs to; absent for connection-level faults.

Overrides

ServerMessage.threadId