From b95f4817204330573a99d9741c091632fddaeeb6 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Mon, 24 Jan 2022 19:14:57 +0000 Subject: [PATCH] Don't show a notification when failing an API request due to analytics failures --- packages/client/src/api.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/client/src/api.js b/packages/client/src/api.js index 4c0b19c210..5b37dd06a8 100644 --- a/packages/client/src/api.js +++ b/packages/client/src/api.js @@ -28,7 +28,11 @@ export const API = createAPIClient({ // Notify all errors if (message) { - notificationStore.actions.error(message) + // Don't notify if the URL contains the word analytics as it may be + // blocked by browser extensions + if (!url?.includes("analytics")) { + notificationStore.actions.error(message) + } } // Log all errors to console