Always add error stack when an endpoint fails.

This commit is contained in:
Fabio Manganiello 2025-03-24 01:41:46 +01:00
parent 21a6ffb717
commit 3e88272277
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -27,6 +27,7 @@ abstract class Route {
protected static ServerError(req: Request, res: Response, error: Error) {
console.error(`Unhandled error in ${req.method} ${req.path}: ${error}`);
console.error(error.stack);
res.status(500).send('Internal Server Error');
}