MCPcopy Index your code
hub / github.com/coder/mux / errorHandler

Method errorHandler

src/node/services/agentSession.ts:4875–4893  ·  view source on GitHub ↗
(...args: unknown[])

Source from the content-addressed store, hash-verified

4873 });
4874
4875 const errorHandler = (...args: unknown[]) => {
4876 const [raw] = args;
4877 if (
4878 typeof raw !== "object" ||
4879 raw === null ||
4880 !("workspaceId" in raw) ||
4881 (raw as { workspaceId: unknown }).workspaceId !== this.workspaceId
4882 ) {
4883 return;
4884 }
4885 const data = raw as StreamErrorPayload & { workspaceId: string };
4886 this.activeStreamErrorEventReceived = true;
4887 this.beginStreamErrorRecoveryDecision();
4888 void this.handleStreamError({
4889 messageId: data.messageId,
4890 error: data.error,
4891 errorType: data.errorType,
4892 }).finally(() => this.resolveStreamErrorRecoveryDecision());
4893 };
4894
4895 this.aiListeners.push({ event: "error", handler: errorHandler });
4896 this.aiService.on("error", errorHandler as never);

Callers

nothing calls this directly

Tested by

no test coverage detected