MCPcopy Index your code
hub / github.com/codeaashu/claude-code / sanitizeAPIError

Function sanitizeAPIError

src/services/api/errorUtils.ts:122–130  ·  view source on GitHub ↗
(apiError: APIError)

Source from the content-addressed store, hash-verified

120 * and returns a user-friendly message instead
121 */
122export function sanitizeAPIError(apiError: APIError): string {
123 const message = apiError.message
124 if (!message) {
125 // Sometimes message is undefined
126 // TODO: figure out why
127 return ''
128 }
129 return sanitizeMessageHTML(message)
130}
131
132/**
133 * Shapes of deserialized API errors from session JSONL.

Callers 1

formatAPIErrorFunction · 0.85

Calls 1

sanitizeMessageHTMLFunction · 0.85

Tested by

no test coverage detected