MCPcopy
hub / github.com/CopilotKit/CopilotKit / onRunErrorEvent

Function onRunErrorEvent

packages/bot-slack/src/event-renderer.ts:496–513  ·  view source on GitHub ↗
({ event })

Source from the content-addressed store, hash-verified

494
495 // ── 4. Errors ─────────────────────────────────────────────────────
496 async onRunErrorEvent({ event }) {
497 // Don't post a warning if we're the ones aborting the run; the
498 // `_(interrupted)_` marker on the partial reply is the user-visible
499 // signal in that case.
500 if (statusMode) await clearStatus();
501 // Close any open native turn stream so the partial reply is committed.
502 await finalizeTurnStream();
503 if (aborted) return;
504 try {
505 await client.chat.postMessage({
506 channel: target.channel,
507 thread_ts: target.threadTs,
508 text: `:warning: Agent error: ${event.message ?? "unknown error"}`,
509 });
510 } catch (err) {
511 console.error("[slack-renderer] error notice failed:", err);
512 }
513 },
514 };
515
516 /** Finalize the native turn stream once (idempotent), attaching feedback if any. */

Callers

nothing calls this directly

Calls 3

clearStatusFunction · 0.85
finalizeTurnStreamFunction · 0.85
errorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…