Skip to main content

Function: userFacingMessage()

userFacingMessage(kind): string

Defined in: src/server/ai/chat/errors.ts:10

Curated, user-safe messages for the assistant's error stream event (spec R2 §5 error taxonomy).

The raw AiError.message (and any provider/stack detail) MUST NOT reach the client — only these fixed strings go on the SSE wire. Keep them short, blameless, and paired with a next step the UI can offer (Retry / wait).

Parameters

kind

AiErrorKind

Returns

string