fix(server): hide unknown 500 details (#27251)

This commit is contained in:
Shoubhit Dash
2026-05-13 10:15:28 +05:30
committed by GitHub
parent 67e6408cef
commit 90c13d93f3
2 changed files with 31 additions and 1 deletions

View File

@@ -48,7 +48,7 @@ export const errorLayer = HttpRouter.middleware<{ handles: unknown }>()((effect)
return Effect.succeed(
HttpServerResponse.jsonUnsafe(
new NamedError.Unknown({
message: error instanceof Error && error.stack ? error.stack : String(error),
message: "Unexpected server error. Check server logs for details.",
}).toObject(),
{ status: 500 },
),