MCPcopy Index your code
hub / github.com/simstudioai/sim / handleErrorEvent

Function handleErrorEvent

apps/sim/lib/copilot/request/handlers/error.ts:4–16  ·  view source on GitHub ↗
(event, context)

Source from the content-addressed store, hash-verified

2import { flushSubagentThinkingBlock, flushThinkingBlock } from './types'
3
4export 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}

Callers

nothing calls this directly

Calls 3

flushThinkingBlockFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected