Skip to content

Commit 059963e

Browse files
PavanKalisettipavankalisetti009ghostwriternr
authored
Fix /api/ping endpoint to return health status (#263)
* Fix /api/ping endpoint to return health status The /api/ping endpoint was unhandled in the MiscHandler, causing readiness probes to fail with a 500 error. This change routes the endpoint to the existing health check handler, ensuring it returns a successful 200 OK response. * chore: Add changeset for ping endpoint fix * update package-lock * Revert "update package-lock" This reverts commit 17929b5. --------- Co-authored-by: Pavan Kalisetti <[email protected]> Co-authored-by: Naresh <[email protected]>
1 parent 0889af6 commit 059963e

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

.changeset/honest-facts-think.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@cloudflare/sandbox': patch
3+
---
4+
5+
Fix a bug where the /api/ping endpoint was not handled, causing a 500 error

packages/sandbox-container/src/handlers/misc-handler.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ export class MiscHandler extends BaseHandler<Request, Response> {
2121
return await this.handleRoot(request, context);
2222
case '/api/health':
2323
return await this.handleHealth(request, context);
24+
case '/api/ping':
25+
return await this.handleHealth(request, context);
2426
case '/api/shutdown':
2527
return await this.handleShutdown(request, context);
2628
case '/api/version':

0 commit comments

Comments
 (0)