MCPcopy Create free account
hub / github.com/Shinplex/rever / errorStream

Function errorStream

workers/retool.ts:252–255  ·  view source on GitHub ↗
(msg: string, code = 503)

Source from the content-addressed store, hash-verified

250 })}\n\ndata: [DONE]\n\n`;
251}
252async function* errorStream(msg: string, code = 503) {
253 yield `data: ${JSON.stringify({ error: { message: msg, code } })}\n\n`;
254 yield "data: [DONE]\n\n";
255}
256function streamResponse(gen: AsyncGenerator<string>, status = 200) {
257 const stream = new ReadableStream({
258 async start(ctrl) {

Callers 1

fetchFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected