Browse Source

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

pull/4434/head
Andrew Kingston 5 years ago
parent
commit
591dafc336
  1. 6
      packages/client/src/api.js

6
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

Loading…
Cancel
Save