MCPcopy Create free account
hub / github.com/Noumena-Network/code / getErrorMessage

Function getErrorMessage

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

Source from the content-addressed store, hash-verified

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

Callers 2

logAPIErrorFunction · 0.70
runPowerShellCommandFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected