mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2026-01-20 11:52:46 +00:00
Fix err is not defined. Remove extra console.error (central error handler already prints the error)
This commit is contained in:
@@ -70,8 +70,7 @@ const findBrews = async (req, res) => {
|
|||||||
res.json({ brews: processedBrews, page });
|
res.json({ brews: processedBrews, page });
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error);
|
throw {...error, message: "Error finding brews in Vault search", HBErrorCode: 90};
|
||||||
throw {...err, message: "Error finding brews in Vault search", HBErrorCode: 90};
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -98,8 +97,7 @@ const findTotal = async (req, res) => {
|
|||||||
res.json({ totalBrews });
|
res.json({ totalBrews });
|
||||||
})
|
})
|
||||||
.catch((error) => {
|
.catch((error) => {
|
||||||
console.error(error);
|
throw {...error, message: "Error finding brews in Vault search findTotal function", HBErrorCode: 91};
|
||||||
throw {...err, message: "Error finding brews in Vault search findTotal function", HBErrorCode: 91};
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user