From 8fb89d761af0acfcd33889f8dbb11f8bcb8e787b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F=20Soner=20U=C5=9Fakl=C4=B1?= Date: Mon, 20 Dec 2021 16:28:03 -0500 Subject: [PATCH] fix: don't crash server if analytics fails to save fixes MongoBulkWriteError: E11000 duplicate key error collection: community.objects index: _key_1_value_-1 dup key: { _key: "analytics:pageviews", value: "1639807200000" } --- src/analytics.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/analytics.js b/src/analytics.js index f2ed7fd0cc..f3e39fc04c 100644 --- a/src/analytics.js +++ b/src/analytics.js @@ -159,7 +159,6 @@ Analytics.writeData = async function () { await Promise.all(dbQueue); } catch (err) { winston.error(`[analytics] Encountered error while writing analytics to data store\n${err.stack}`); - throw err; } };