mirror of
https://codeberg.org/SafeTwitch/safetwitch-backend.git
synced 2025-03-11 13:41:20 -05:00
Fix error handler to send the error message
This commit is contained in:
parent
fb0dcefe94
commit
075c5ea9f7
1 changed files with 1 additions and 2 deletions
|
@ -4,6 +4,5 @@ export const errorHandler = (err: Error, req: Request, res: Response, next: Next
|
|||
if (res.headersSent) {
|
||||
return next(err)
|
||||
}
|
||||
|
||||
res.status(500).send({ status: 'error', message: err})
|
||||
res.status(500).send({ status: 'error', message: err.stack})
|
||||
}
|
Loading…
Add table
Reference in a new issue