MCPcopy Index your code
hub / github.com/TanStack/ai / isRunErrorChunk

Function isRunErrorChunk

packages/ai-sandbox/src/run.ts:18–22  ·  view source on GitHub ↗

Whether a chunk is the terminal error event the chat engine emits.

(
  chunk: StreamChunk,
)

Source from the content-addressed store, hash-verified

16
17/** Whether a chunk is the terminal error event the chat engine emits. */
18function isRunErrorChunk(
19 chunk: StreamChunk,
20): chunk is StreamChunk & { message: string; code?: string } {
21 return chunk.type === EventType.RUN_ERROR
22}
23
24/** Pull `{ message, code }` off a RUN_ERROR chunk for the run record. */
25function runErrorFromChunk(

Callers 1

pipeToRunLogFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected