(data: Record<string, unknown>)
| 23 | const RETRYABLE_STATUSES = new Set([429, 500, 502, 503, 504]); |
| 24 | |
| 25 | function pickErrorDetail(data: Record<string, unknown>): string { |
| 26 | return extractApiErrorMessage(data) ?? 'unknown'; |
| 27 | } |
| 28 | |
| 29 | function tokenFromResponse(payload: Record<string, unknown>): TokenInfo { |
| 30 | // Required-field validation. Reject responses that are missing |
no test coverage detected