(event, context)
| 2 | import { flushSubagentThinkingBlock, flushThinkingBlock } from './types' |
| 3 | |
| 4 | export const handleErrorEvent: StreamHandler = (event, context) => { |
| 5 | flushSubagentThinkingBlock(context) |
| 6 | flushThinkingBlock(context) |
| 7 | if (event.type !== 'error') { |
| 8 | context.streamComplete = true |
| 9 | return |
| 10 | } |
| 11 | const message = event.payload.message || event.payload.error |
| 12 | if (message) { |
| 13 | context.errors.push(message) |
| 14 | } |
| 15 | context.streamComplete = true |
| 16 | } |
nothing calls this directly
no test coverage detected