(status: number, body: unknown)
| 248 | * authenticated; the upstream API is disabled in the OAuth client's project, |
| 249 | * and only enabling it there (not reconnecting) fixes it. */ |
| 250 | export const classifyProbeResponse = (status: number, body: unknown): HealthStatus => { |
| 251 | const byStatus = classifyHttpStatus(status); |
| 252 | if (status !== 403 || byStatus !== "expired") return byStatus; |
| 253 | return errorReasonMarkers(body).some((reason) => CONFIGURATION_403_REASONS.has(reason)) |
| 254 | ? "misconfigured" |
| 255 | : "expired"; |
| 256 | }; |
| 257 | |
| 258 | /** Resolve a dot-path (`a.b.0.c`) against a JSON value and coerce the leaf to a |
| 259 | * display string. Numeric segments index arrays. Returns undefined when the |
no test coverage detected