mirror of
https://github.com/naturalcrit/homebrewery.git
synced 2025-12-24 14:12:40 +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 });
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
throw {...err, message: "Error finding brews in Vault search", HBErrorCode: 90};
|
||||
throw {...error, message: "Error finding brews in Vault search", HBErrorCode: 90};
|
||||
});
|
||||
};
|
||||
|
||||
@@ -98,8 +97,7 @@ const findTotal = async (req, res) => {
|
||||
res.json({ totalBrews });
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
throw {...err, message: "Error finding brews in Vault search findTotal function", HBErrorCode: 91};
|
||||
throw {...error, message: "Error finding brews in Vault search findTotal function", HBErrorCode: 91};
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user