(message: string)
| 17 | * (e.g., `${error.type}: ${error.message}` where type is undefined). |
| 18 | */ |
| 19 | export 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. |
no outgoing calls
no test coverage detected