Don't show a notification when failing an API request due to analytics failures
This commit is contained in:
parent
4d9e7cac31
commit
591dafc336
|
@ -28,8 +28,12 @@ export const API = createAPIClient({
|
||||||
|
|
||||||
// Notify all errors
|
// Notify all errors
|
||||||
if (message) {
|
if (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)
|
notificationStore.actions.error(message)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Log all errors to console
|
// Log all errors to console
|
||||||
console.warn(`[Client] HTTP ${status} on ${method}:${url}\n\t${message}`)
|
console.warn(`[Client] HTTP ${status} on ${method}:${url}\n\t${message}`)
|
||||||
|
|
Loading…
Reference in New Issue