MCPcopy
hub / github.com/FlowiseAI/Flowise / streamErrorEvent

Method streamErrorEvent

packages/server/src/utils/SSEStreamer.ts:279–287  ·  view source on GitHub ↗
(chatId: string, msg: string)

Source from the content-addressed store, hash-verified

277 }
278
279 streamErrorEvent(chatId: string, msg: string) {
280 if (msg.includes('401 Incorrect API key provided'))
281 msg = '401 Unauthorized – check your API key and ensure it has access to the requested model.'
282 const clientResponse = {
283 event: 'error',
284 data: msg
285 }
286 this.safeWrite(chatId, 'message:\ndata:' + JSON.stringify(clientResponse) + '\n\n')
287 }
288
289 streamMetadataEvent(chatId: string, apiResponse: any) {
290 const metadataJson: any = {}

Callers 3

createPredictionFunction · 0.45
createWebhookFunction · 0.45

Calls 2

safeWriteMethod · 0.95
stringifyMethod · 0.80

Tested by

no test coverage detected