1
0
Fork 0
mirror of synced 2024-10-01 17:47:46 +13:00

Don't show a notification when failing an API request due to analytics failures

This commit is contained in:
Andrew Kingston 2022-01-24 19:14:57 +00:00
parent 4d9e7cac31
commit 591dafc336

View file

@ -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