0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-24 16:22:44 +00:00

Fix err is not defined. Remove extra console.error (central error handler already prints the error)

This commit is contained in:
Trevor Buckner
2024-09-03 23:44:24 -04:00
parent 56185e2a1c
commit 44099c813c

View File

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