bug description:
The Cap standalone server currently exposes stack traces in API error responses, which reveals internal implementation details to end users.
affects:
to reproduce:
- Deploy the Cap standalone server using the Docker image
tiago2/cap:latest from the docs https://trycap.dev/guide/#_1-run-the-server
- Make a request to a non-existent endpoint (e.g., GET
/test)
- Observe the error response contains a full stack trace
Example:
{
"success": false,
"error": "NOT_FOUND",
"detail": {
"name": "Error",
"message": "NOT_FOUND",
"stack": "Error\n at anonymous (file:///usr/src/app/node_modules/elysia/dist/compose.mjs:12:33)\n at composeGeneralHandler (/usr/src/app/node_modules/elysia/dist/compose.mjs:1187:3)\n at compile (/usr/src/app/node_modules/elysia/dist/index.mjs:1878:119)\n at \u003Canonymous\u003E (/usr/src/app/node_modules/elysia/dist/adapter/bun/index.mjs:201:29)\n at processTicksAndRejections (unknown:7:39)",
"code": "NOT_FOUND"
}
}
expected behavior:
Deployment by following docs guide does not include stack trace in details.
bug description:
The Cap standalone server currently exposes stack traces in API error responses, which reveals internal implementation details to end users.
affects:
to reproduce:
tiago2/cap:latestfrom the docs https://trycap.dev/guide/#_1-run-the-server/test)Example:
{ "success": false, "error": "NOT_FOUND", "detail": { "name": "Error", "message": "NOT_FOUND", "stack": "Error\n at anonymous (file:///usr/src/app/node_modules/elysia/dist/compose.mjs:12:33)\n at composeGeneralHandler (/usr/src/app/node_modules/elysia/dist/compose.mjs:1187:3)\n at compile (/usr/src/app/node_modules/elysia/dist/index.mjs:1878:119)\n at \u003Canonymous\u003E (/usr/src/app/node_modules/elysia/dist/adapter/bun/index.mjs:201:29)\n at processTicksAndRejections (unknown:7:39)", "code": "NOT_FOUND" } }expected behavior:
Deployment by following docs guide does not include stack trace in details.