createErrorStream
createErrorStream(
errorText:string):ReadableStream<AssistantStreamEvent>
Defined in: src/vercel/streams.ts:56Â
Creates a ReadableStream that emits a single error event compatible
with the Vercel AI stream contract. This allows Portal API errors to be
surfaced directly in UI components that expect streamed assistant output.
Parameters
| Parameter | Type | Description |
|---|---|---|
|
|
|
A human-readable error message to display in the UI. |
Returns
ReadableStream<AssistantStreamEvent>
A stream that, when consumed, immediately emits the error event.
Last updated on