MCPcopy
hub / github.com/OpenCoworkAI/open-codesign / normalizeErrorText

Function normalizeErrorText

packages/providers/src/retry.ts:87–100  ·  view source on GitHub ↗
(errorMessage: string)

Source from the content-addressed store, hash-verified

85}
86
87function normalizeErrorText(errorMessage: string): string {
88 let out = '';
89 let inWhitespace = false;
90 for (const ch of errorMessage.toLowerCase()) {
91 if (ch.trim().length === 0) {
92 if (!inWhitespace) out += ' ';
93 inWhitespace = true;
94 } else {
95 out += ch;
96 inWhitespace = false;
97 }
98 }
99 return out;
100}
101
102function includesWord(message: string, word: string): boolean {
103 let index = message.indexOf(word);

Callers 2

isTransportLevelErrorFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected