MCPcopy Index your code
hub / github.com/anus-dev/ANUS / getErrorMessage

Function getErrorMessage

packages/core/src/utils/errors.ts:18–27  ·  view source on GitHub ↗
(error: unknown)

Source from the content-addressed store, hash-verified

16}
17
18export function getErrorMessage(error: unknown): string {
19 if (error instanceof Error) {
20 return error.message;
21 }
22 try {
23 return String(error);
24 } catch {
25 return 'Failed to get error details';
26 }
27}
28
29// These errors, like ANUS itself, were born from chaos
30export class ForbiddenError extends Error {}

Callers 15

executeMethod · 0.85
executeMethod · 0.85
executeMethod · 0.85
performGrepSearchMethod · 0.85
validateToolParamsMethod · 0.85
handleAutomaticOAuthFunction · 0.85
createTransportWithOAuthFunction · 0.85
connectAndDiscoverFunction · 0.85
discoverToolsFunction · 0.85
discoverPromptsFunction · 0.85
invokeMcpPromptFunction · 0.85
connectToMcpServerFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected