MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / makeErrorStream

Function makeErrorStream

packages/kosong/test/anthropic-errors.test.ts:243–253  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

241 }
242
243 function makeErrorStream(error: Error) {
244 return {
245 async *[Symbol.asyncIterator]() {
246 yield {
247 type: 'message_start',
248 message: { id: 'msg_err', usage: { input_tokens: 0 } },
249 };
250 throw error;
251 },
252 };
253 }
254
255 it('APIConnectionTimeoutError during stream iteration is converted', async () => {
256 const provider = createStreamProvider();

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected