MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / classifyProbeResponse

Function classifyProbeResponse

packages/core/sdk/src/health-check.ts:250–256  ·  view source on GitHub ↗
(status: number, body: unknown)

Source from the content-addressed store, hash-verified

248 * authenticated; the upstream API is disabled in the OAuth client's project,
249 * and only enabling it there (not reconnecting) fixes it. */
250export 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

Callers 2

checkHealthOpenApiFunction · 0.90

Calls 2

classifyHttpStatusFunction · 0.85
errorReasonMarkersFunction · 0.85

Tested by

no test coverage detected