@okay-e9g/hono-config 0.0.14 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/routes/health.ts +3 -3
package/package.json
CHANGED
package/src/routes/health.ts
CHANGED
|
@@ -135,8 +135,8 @@ const runCheck = async <T extends Env>(
|
|
|
135
135
|
*
|
|
136
136
|
* Checks run concurrently. A failure in a critical check produces an
|
|
137
137
|
* `unhealthy` response with HTTP 503, while failures limited to non-critical
|
|
138
|
-
* checks produce a `degraded` response with HTTP
|
|
139
|
-
* route produces a healthy liveness response.
|
|
138
|
+
* checks produce a `degraded` response with HTTP 207. Healthy responses use
|
|
139
|
+
* HTTP 200. With no checks, the route produces a healthy liveness response.
|
|
140
140
|
*
|
|
141
141
|
* Thrown check messages are included in the response. Protect detailed health
|
|
142
142
|
* routes with appropriate authentication or network restrictions when those
|
|
@@ -222,7 +222,7 @@ export const createHealthRoute = <T extends Env = Env>({
|
|
|
222
222
|
release: typeof release === 'function' ? release(c) : release,
|
|
223
223
|
status,
|
|
224
224
|
} satisfies HealthResponse,
|
|
225
|
-
status === '
|
|
225
|
+
status === 'healthy' ? 200 : status === 'degraded' ? 207 : 503,
|
|
226
226
|
);
|
|
227
227
|
};
|
|
228
228
|
};
|