Always add error stack when an endpoint fails.
This commit is contained in:
parent
21a6ffb717
commit
3e88272277
1 changed files with 1 additions and 0 deletions
|
@ -27,6 +27,7 @@ abstract class Route {
|
||||||
|
|
||||||
protected static ServerError(req: Request, res: Response, error: Error) {
|
protected static ServerError(req: Request, res: Response, error: Error) {
|
||||||
console.error(`Unhandled error in ${req.method} ${req.path}: ${error}`);
|
console.error(`Unhandled error in ${req.method} ${req.path}: ${error}`);
|
||||||
|
console.error(error.stack);
|
||||||
res.status(500).send('Internal Server Error');
|
res.status(500).send('Internal Server Error');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue