0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-29 19:52:43 +00:00

Add custom error messages.

This commit is contained in:
Trevor Buckner
2024-01-18 17:20:31 -05:00
parent a241813b8d
commit b0ea34cc3f
2 changed files with 40 additions and 6 deletions

View File

@@ -477,7 +477,7 @@ app.use(async (err, req, res, next)=>{
if(err.originalUrl?.startsWith('/api/')) {
// console.log('API error');
res.status(err.status || err.response?.status || 500).send(err.message || err);
res.status(err.status || err.response?.status || 500).send(err);
return;
}