Skip to content

Commit

Permalink
fix: suppress live events error on onboarding (#25212)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
raquelmsmith and github-actions[bot] committed Sep 25, 2024
1 parent 0cc21dd commit 2196aea
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion frontend/src/scenes/activity/live/liveEventsTableLogic.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { lemonToast, Spinner } from '@posthog/lemon-ui'
import { actions, connect, events, kea, listeners, path, reducers, selectors } from 'kea'
import { router } from 'kea-router'
import { liveEventsHostOrigin } from 'lib/utils/apiHost'
import { teamLogic } from 'scenes/teamLogic'

Expand Down Expand Up @@ -153,7 +154,10 @@ export const liveEventsTableLogic = kea<liveEventsTableLogicType>([

source.onerror = function (e) {
console.error('Failed to poll events: ', e)
if (!cache.hasShownLiveStreamErrorToast) {
if (
!cache.hasShownLiveStreamErrorToast &&
!router.values.currentLocation.pathname.includes('onboarding')
) {
lemonToast.error(
`Cannot connect to the live event stream. Continuing to retry in the background…`,
{ icon: <Spinner />, toastId: ERROR_TOAST_ID, autoClose: false }
Expand Down

0 comments on commit 2196aea

Please sign in to comment.