MCPcopy Create free account
hub / github.com/oboard/claude-code-rev / getErrorMessage

Function getErrorMessage

src/services/api/logging.ts:48–54  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

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

Callers 2

logAPIErrorFunction · 0.70
runPowerShellCommandFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected