From 0b4e285649e9f29e1a7fa3fd786e751b8755af76 Mon Sep 17 00:00:00 2001 From: ekzyis Date: Wed, 13 Sep 2023 13:35:46 +0200 Subject: [PATCH] Catch errors of slack requests --- pages/api/log/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/log/index.js b/pages/api/log/index.js index ba814c75c..25150b917 100644 --- a/pages/api/log/index.js +++ b/pages/api/log/index.js @@ -20,7 +20,7 @@ export default async (req, res) => { const { id } = await models.log.create({ data: { level: level.toUpperCase(), name, message, env, context } }) - slackPostMessage({ id, ...req.body }) + slackPostMessage({ id, ...req.body }).catch(console.error) return res.status(200).json({ status: 200, message: 'ok' }) }