MCPcopy Create free account
hub / github.com/aetherstate/GODMOD3.AI / categorizeError

Function categorizeError

api/lib/metadata.ts:137–147  ·  view source on GitHub ↗
(error?: string)

Source from the content-addressed store, hash-verified

135// ── Error Categorization ─────────────────────────────────────────────
136
137export function categorizeError(error?: string): string | undefined {
138 if (!error) return undefined
139 const lower = error.toLowerCase()
140 if (lower.includes('timeout') || lower.includes('abort')) return 'timeout'
141 if (lower.includes('rate') || lower.includes('429')) return 'rate_limit'
142 if (lower.includes('auth') || lower.includes('401') || lower.includes('403')) return 'auth'
143 if (lower.includes('empty')) return 'empty'
144 if (lower.includes('race ended')) return 'early_exit'
145 if (lower.includes('api error') || lower.includes('http')) return 'model_error'
146 return 'unknown'
147}
148
149// ── Query: Raw Events ────────────────────────────────────────────────
150

Callers 2

consortium.tsFile · 0.90
chat.tsFile · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected