(error: Error)
| 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(); |
no outgoing calls
no test coverage detected