0
Fork 0
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:
dragongoose 2023-04-29 19:36:35 -04:00
parent fb0dcefe94
commit 075c5ea9f7
No known key found for this signature in database
GPG key ID: 50DB99B921579009

View file

@ -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})
}