MCPcopy
hub / github.com/KeygraphHQ/shannon / isRetryableError

Function isRetryableError

apps/worker/src/services/error-handling.ts:86–94  ·  view source on GitHub ↗
(error: Error)

Source from the content-addressed store, hash-verified

84
85// Conservative retry classification - unknown errors don't retry (fail-safe default)
86export function isRetryableError(error: Error): boolean {
87 const message = error.message.toLowerCase();
88
89 if (NON_RETRYABLE_PATTERNS.some((pattern) => message.includes(pattern))) {
90 return false;
91 }
92
93 return RETRYABLE_PATTERNS.some((pattern) => message.includes(pattern));
94}
95
96/**
97 * Classifies errors by ErrorCode for reliable, code-based classification.

Callers 3

writeErrorLogFunction · 0.85
runClaudePromptFunction · 0.85
validateCredentialsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected