(error?: string)
| 111 | // ── Error Categorization ───────────────────────────────────────────── |
| 112 | |
| 113 | export function categorizeError(error?: string): string | undefined { |
| 114 | if (!error) return undefined |
| 115 | const lower = error.toLowerCase() |
| 116 | if (lower.includes('timeout') || lower.includes('abort')) return 'timeout' |
| 117 | if (lower.includes('rate') || lower.includes('429')) return 'rate_limit' |
| 118 | if (lower.includes('auth') || lower.includes('401') || lower.includes('403')) return 'auth' |
| 119 | if (lower.includes('empty')) return 'empty' |
| 120 | if (lower.includes('race ended')) return 'early_exit' |
| 121 | if (lower.includes('api error') || lower.includes('http')) return 'model_error' |
| 122 | return 'unknown' |
| 123 | } |
| 124 | |
| 125 | // ── Query: Raw Events ──────────────────────────────────────────────── |
| 126 |
no outgoing calls
no test coverage detected