MCPcopy Create free account
hub / github.com/tiann/hapi / getErrorMessage

Function getErrorMessage

cli/src/modules/common/rpcResponses.ts:18–23  ·  view source on GitHub ↗
(error: unknown, fallback: string)

Source from the content-addressed store, hash-verified

16}
17
18export function getErrorMessage(error: unknown, fallback: string): string {
19 if (error instanceof Error && error.message) {
20 return error.message
21 }
22 return fallback
23}

Callers 15

listCursorModelsFunction · 0.90
listCodexModelsFunction · 0.90
runCursorAcpModelProbeFunction · 0.90
listOpencodeModelsForCwdFunction · 0.90
registerSkillsHandlersFunction · 0.90
registerFileHandlersFunction · 0.90
registerUploadHandlersFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected