MCPcopy Index your code
hub / github.com/TanStack/router / encodeErrorFrame

Function encodeErrorFrame

packages/start-server-core/src/frame-protocol.ts:79–83  ·  view source on GitHub ↗
(streamId: number, error: unknown)

Source from the content-addressed store, hash-verified

77 * Encodes a raw stream error frame.
78 */
79export function encodeErrorFrame(streamId: number, error: unknown): Uint8Array {
80 const message =
81 error instanceof Error ? error.message : String(error ?? 'Unknown error')
82 return encodeFrame(FrameType.ERROR, streamId, textEncoder.encode(message))
83}
84
85/**
86 * Creates a multiplexed ReadableStream from JSON stream and raw streams.

Callers 2

pumpRawStreamFunction · 0.70

Calls 1

encodeFrameFunction · 0.70

Tested by

no test coverage detected