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

Function stripNoisyErrorPrefix

src/node/services/utils/sendMessageError.ts:19–25  ·  view source on GitHub ↗
(message: string)

Source from the content-addressed store, hash-verified

17 * (e.g., `${error.type}: ${error.message}` where type is undefined).
18 */
19export const stripNoisyErrorPrefix = (message: string): string => {
20 // Strip "undefined: " prefix (common in Anthropic SDK errors)
21 if (message.startsWith("undefined: ")) {
22 return message.slice("undefined: ".length);
23 }
24 return message;
25};
26
27/**
28 * Helper to wrap arbitrary errors into SendMessageError structures.

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected