IO-3183-Dependency-Updates-and-maintenance - Minor front end dep bump, logging clean up on OS

This commit is contained in:
Dave Richer
2025-03-24 13:23:41 -04:00
parent f3b9c6399f
commit 922aaaf4b2
3 changed files with 20 additions and 14 deletions

View File

@@ -160,6 +160,11 @@ async function OpenSearchUpdateHandler(req, res) {
res.status(200).json(response.body);
}
} catch (error) {
// We don't want this spam message existing in development/test,
if (process.env?.NODE_ENV !== "production" && error?.message === "Invalid URL") {
return res.status(400).json(JSON.stringify(error));
}
logger.log("os-handler-error", "ERROR", null, null, {
id: req.body.event.data.new.id,
index: req.body.table.name,
@@ -167,6 +172,7 @@ async function OpenSearchUpdateHandler(req, res) {
stack: error.stack
// body: document
});
res.status(400).json(JSON.stringify(error));
}
}