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

Function classifyHttpStatus

packages/core/sdk/src/health-check.ts:209–213  ·  view source on GitHub ↗
(status: number)

Source from the content-addressed store, hash-verified

207 * BODY is available, use `classifyProbeResponse` instead, which tells a
208 * credential 403 apart from a configuration 403. */
209export const classifyHttpStatus = (status: number): HealthStatus => {
210 if (status >= 200 && status < 300) return "healthy";
211 if (status === 401 || status === 403) return "expired";
212 return "degraded";
213};
214
215// Error `reason` / `status` markers that make a 403 a CONFIGURATION rejection
216// rather than a credential one. Deliberately narrow and provider-shaped:

Callers 3

mcpLivenessFailureStatusFunction · 0.90
classifyProbeResponseFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected