(status: number)
| 141 | /** Map an HTTP status to a health state: 2xx healthy, 401/403 expired (the auth |
| 142 | * wall), everything else degraded. */ |
| 143 | export const classifyHttpStatus = (status: number): HealthStatus => { |
| 144 | if (status >= 200 && status < 300) return "healthy"; |
| 145 | if (status === 401 || status === 403) return "expired"; |
| 146 | return "degraded"; |
| 147 | }; |
| 148 | |
| 149 | /** Resolve a dot-path (`a.b.0.c`) against a JSON value and coerce the leaf to a |
| 150 | * display string. Numeric segments index arrays. Returns undefined when the |
no outgoing calls
no test coverage detected