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

Function getErrorMessage

source code/services/api/logging.ts:50–56  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

48export type GlobalCacheStrategy = 'tool_based' | 'system_prompt' | 'none'
49
50function getErrorMessage(error: unknown): string {
51 if (error instanceof APIError) {
52 const body = error.error as { error?: { message?: string } } | undefined
53 if (body?.error?.message) return body.error.message
54 }
55 return error instanceof Error ? error.message : String(error)
56}
57
58type KnownGateway =
59 | 'litellm'

Callers 2

logAPIErrorFunction · 0.70
runPowerShellCommandFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected