Security fix for MCP

This commit is contained in:
2026-10-12 14:47:50 +02:00
parent 73eacb09c2
commit 24fa3fdcdf
6 changed files with 20 additions and 6 deletions
+4 -1
View File
@@ -58,9 +58,12 @@ export function createHealthRoute(args: CreateHealthRouteArgs): () => Promise<Re
status: 200,
})
} catch (err) {
// Log the real error for ops; keep the PUBLIC body generic — a 503 with
// `db: 'down'` is all an orchestrator needs, and raw DB error text (host,
// credentials-in-URL, driver internals) must not leak on a public route.
console.warn('[ipal] createHealthRoute: database unreachable:', err)
const body = {
db: 'down',
error: err instanceof Error ? err.message : 'unknown',
status: 'error',
timestamp: new Date().toISOString(),
tookMs: Date.now() - startedAt,