mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-06 16:32:40 +00:00
Update app.js
This commit is contained in:
@@ -520,7 +520,7 @@ app.use(async (err, req, res, next)=>{
|
|||||||
err.originalUrl = req.originalUrl;
|
err.originalUrl = req.originalUrl;
|
||||||
console.error(err);
|
console.error(err);
|
||||||
|
|
||||||
if(err.originalUrl?.startsWith('/api/')) {
|
if(err.originalUrl?.startsWith('/api')) {
|
||||||
// console.log('API error');
|
// console.log('API error');
|
||||||
res.status(err.status || err.response?.status || 500).send(err);
|
res.status(err.status || err.response?.status || 500).send(err);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user