MCPcopy Create free account
hub / github.com/AnukarOP/claude-code-leaked / sanitizeAPIError

Function sanitizeAPIError

source code/services/api/errorUtils.ts:124–132  ·  view source on GitHub ↗
(apiError: APIError)

Source from the content-addressed store, hash-verified

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

Callers 1

formatAPIErrorFunction · 0.85

Calls 1

sanitizeMessageHTMLFunction · 0.85

Tested by

no test coverage detected