mirror of
https://github.com/snapotter-hq/SnapOtter.git
synced 2026-08-03 07:46:42 +02:00
feat: add LOG_LEVEL env var and improve error messages
Add configurable LOG_LEVEL (fatal/error/warn/info/debug/trace) for Fastify logger. Always return error details in tool processing responses and combine error + details in frontend display.
This commit is contained in:
@@ -306,7 +306,7 @@ export function createToolRoute<T>(app: FastifyInstance, config: ToolRouteConfig
|
||||
request.log.error({ err, toolId: config.toolId }, "Tool processing failed");
|
||||
return reply.status(422).send({
|
||||
error: "Processing failed",
|
||||
details: process.env.NODE_ENV === "production" ? undefined : message,
|
||||
details: message,
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user