Skip to content

Commit

Permalink
core: frontend: libs: Use new isBackendOffline
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Jan 17, 2025
1 parent f098bcb commit feec508
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/frontend/src/libs/notifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import message_manager, { MessageLevel } from '@/libs/message-manager'
import notifications from '@/store/notifications'
import { GenericError, getErrorMessage, Service } from '@/types/common'
import { LiveNotification, NotificationLevel } from '@/types/notifications'
import { backend_offline_error } from '@/utils/api'
import { isBackendOffline } from '@/utils/api'

class Notifier {
constructor(
Expand Down Expand Up @@ -39,7 +39,7 @@ class Notifier {
}

pushBackError(type: string, error: GenericError, alert = false): void {
if (error === backend_offline_error) { return }
if (isBackendOffline(error)) { return }
const message = getErrorMessage(error)
this.pushError(type, message, alert)
}
Expand Down

0 comments on commit feec508

Please sign in to comment.