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

Function classifyProbeResponse

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

Source from the content-addressed store, hash-verified

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

Callers 2

checkHealthOpenApiFunction · 0.90

Calls 2

classifyHttpStatusFunction · 0.85
errorReasonMarkersFunction · 0.85

Tested by

no test coverage detected