(status: number, body: unknown)
| 195 | * authenticated; the upstream API is disabled in the OAuth client's project, |
| 196 | * and only enabling it there (not reconnecting) fixes it. */ |
| 197 | export const classifyProbeResponse = (status: number, body: unknown): HealthStatus => { |
| 198 | const byStatus = classifyHttpStatus(status); |
| 199 | if (status !== 403 || byStatus !== "expired") return byStatus; |
| 200 | return errorReasonMarkers(body).some((reason) => CONFIGURATION_403_REASONS.has(reason)) |
| 201 | ? "misconfigured" |
| 202 | : "expired"; |
| 203 | }; |
| 204 | |
| 205 | /** Resolve a dot-path (`a.b.0.c`) against a JSON value and coerce the leaf to a |
| 206 | * display string. Numeric segments index arrays. Returns undefined when the |
no test coverage detected