diff --git a/packages/client/Atmosphere.ts b/packages/client/Atmosphere.ts index 1e36534f1f4..6d34782ae72 100644 --- a/packages/client/Atmosphere.ts +++ b/packages/client/Atmosphere.ts @@ -217,7 +217,9 @@ export default class Atmosphere extends Environment { : value _next(nextObj) } - this.handleSubscribePromise(operation, variables, _cacheConfig, sink).catch() + this.handleSubscribePromise(operation, variables, _cacheConfig, sink).catch(() => { + /*ignore*/ + }) }) } @@ -297,7 +299,9 @@ export default class Atmosphere extends Environment { let data = request.id if (!__PRODUCTION__) { try { - const queryMap = await import('../../queryMap.json').catch() + const queryMap = await import('../../queryMap.json').catch(() => { + /*ignore*/ + }) data = queryMap[request.id as keyof typeof queryMap] as string } catch (e) { return diff --git a/packages/client/components/ActionMeetingSidebar.tsx b/packages/client/components/ActionMeetingSidebar.tsx index a6470ef2b78..88809db9700 100644 --- a/packages/client/components/ActionMeetingSidebar.tsx +++ b/packages/client/components/ActionMeetingSidebar.tsx @@ -86,7 +86,9 @@ const ActionMeetingSidebar = (props: Props) => { } = itemStage || {} const canNavigate = isViewerFacilitator ? isNavigableByFacilitator : isNavigable const handleClick = () => { - gotoStageId(itemStageId).catch() + gotoStageId(itemStageId).catch(() => { + /*ignore*/ + }) handleMenuClick() } const phaseCount = diff --git a/packages/client/components/ActionSidebarAgendaItemsSection.tsx b/packages/client/components/ActionSidebarAgendaItemsSection.tsx index 4063bf42a36..e24c18d0bf8 100644 --- a/packages/client/components/ActionSidebarAgendaItemsSection.tsx +++ b/packages/client/components/ActionSidebarAgendaItemsSection.tsx @@ -35,7 +35,9 @@ const ActionSidebarAgendaItemsSection = (props: Props) => { ) const {team} = meeting const handleClick = async (stageId: string) => { - gotoStageId(stageId).catch() + gotoStageId(stageId).catch(() => { + /*ignore*/ + }) handleMenuClick() } // show agenda (no blur) at all times if the updates phase isNavigable diff --git a/packages/client/components/AnalyticsPage.tsx b/packages/client/components/AnalyticsPage.tsx index e27a528c60a..e7cf088e3aa 100644 --- a/packages/client/components/AnalyticsPage.tsx +++ b/packages/client/components/AnalyticsPage.tsx @@ -155,7 +155,9 @@ const AnalyticsPage = () => { window.localStorage.setItem(LocalStorageKey.EMAIL, email) safeIdentify(atmosphere.viewerId, email) } - cacheEmail().catch() + cacheEmail().catch(() => { + /*ignore*/ + }) }, []) useEffect(() => { diff --git a/packages/client/components/AtmosphereProvider/AtmosphereProvider.tsx b/packages/client/components/AtmosphereProvider/AtmosphereProvider.tsx index 6e974b3ab82..ef02f711475 100644 --- a/packages/client/components/AtmosphereProvider/AtmosphereProvider.tsx +++ b/packages/client/components/AtmosphereProvider/AtmosphereProvider.tsx @@ -15,7 +15,9 @@ class AtmosphereProvider extends Component { constructor(props: Props) { super(props) if (props.getLocalAtmosphere) { - this.loadDemo().catch() + this.loadDemo().catch(() => { + /*ignore*/ + }) } else { this.atmosphere = new Atmosphere() this.atmosphere.getAuthToken(window) @@ -23,9 +25,7 @@ class AtmosphereProvider extends Component { } async loadDemo() { - const LocalAtmosphere = await this.props.getLocalAtmosphere!() - .then((mod) => mod.default) - .catch() + const LocalAtmosphere = await this.props.getLocalAtmosphere!().then((mod) => mod.default) this.atmosphere = new LocalAtmosphere() this.forceUpdate() } diff --git a/packages/client/components/AuthProvider.tsx b/packages/client/components/AuthProvider.tsx index 786c099b18f..5b30c0b1922 100644 --- a/packages/client/components/AuthProvider.tsx +++ b/packages/client/components/AuthProvider.tsx @@ -26,7 +26,9 @@ const AuthProvider = () => { setError('Error logging in') } } - callOpener().catch() + callOpener().catch(() => { + /*ignore*/ + }) }, []) if (!error) return null diff --git a/packages/client/components/MassInvitationTokenLink.tsx b/packages/client/components/MassInvitationTokenLink.tsx index 5834127a73f..e0b25e9fc66 100644 --- a/packages/client/components/MassInvitationTokenLink.tsx +++ b/packages/client/components/MassInvitationTokenLink.tsx @@ -65,7 +65,9 @@ const MassInvitationTokenLink = (props: Props) => { submitMutation() CreateMassInvitationMutation(atmosphere, {meetingId, teamId}, {onError, onCompleted}) } - doFetch().catch() + doFetch().catch(() => { + /*ignore*/ + }) }, [isTokenValid, submitting]) const onCopy = () => { SendClientSideEvent(atmosphere, 'Copied Invite Link', { diff --git a/packages/client/components/MeetingSidebarTeamMemberStageItems.tsx b/packages/client/components/MeetingSidebarTeamMemberStageItems.tsx index a0cd52f1196..a1120d11b97 100644 --- a/packages/client/components/MeetingSidebarTeamMemberStageItems.tsx +++ b/packages/client/components/MeetingSidebarTeamMemberStageItems.tsx @@ -60,7 +60,9 @@ const MeetingSidebarTeamMemberStageItems = (props: Props) => { const teamMemberStage = sidebarPhase && sidebarPhase.stages.find((stage) => stage.teamMemberId === teamMemberId) const teamMemberStageId = (teamMemberStage && teamMemberStage.id) || '' - gotoStageId(teamMemberStageId).catch() + gotoStageId(teamMemberStageId).catch(() => { + /*ignore*/ + }) handleMenuClick() } const atmosphere = useAtmosphere() diff --git a/packages/client/components/PokerMeetingSidebar.tsx b/packages/client/components/PokerMeetingSidebar.tsx index 1356400253e..15ba6b1dec9 100644 --- a/packages/client/components/PokerMeetingSidebar.tsx +++ b/packages/client/components/PokerMeetingSidebar.tsx @@ -92,7 +92,9 @@ const PokerMeetingSidebar = (props: Props) => { } = itemStage || {} const canNavigate = isViewerFacilitator ? isNavigableByFacilitator : isNavigable const handleClick = () => { - gotoStageId(itemStageId).catch() + gotoStageId(itemStageId).catch(() => { + /*ignore*/ + }) handleMenuClick() } const estimatePhase = phases.find((phase) => { diff --git a/packages/client/components/PokerSidebarEstimateSection.tsx b/packages/client/components/PokerSidebarEstimateSection.tsx index 34454fc20d4..a422d56ad8d 100644 --- a/packages/client/components/PokerSidebarEstimateSection.tsx +++ b/packages/client/components/PokerSidebarEstimateSection.tsx @@ -112,7 +112,9 @@ const PokerSidebarEstimateSection = (props: Props) => { const handleClick = (stageIds: string[]) => { // if the facilitator is at one of the stages, go there if (stageIds.includes(facilitatorStageId)) { - gotoStageId(facilitatorStageId).catch() + gotoStageId(facilitatorStageId).catch(() => { + /*ignore*/ + }) } else { // goto the first stage that the user hasn't voted on const summaryStages = stageIds.map((id) => stages.find((stage) => stage.id === id)) diff --git a/packages/client/components/RetroMeetingSidebar.tsx b/packages/client/components/RetroMeetingSidebar.tsx index 40a32dbab38..e12dbf460d5 100644 --- a/packages/client/components/RetroMeetingSidebar.tsx +++ b/packages/client/components/RetroMeetingSidebar.tsx @@ -116,7 +116,9 @@ const RetroMeetingSidebar = (props: Props) => { confirmingPhase === phaseType ) { setConfirmingPhase(null) - gotoStageId(itemStageId).catch() + gotoStageId(itemStageId).catch(() => { + /*ignore*/ + }) handleMenuClick() } else { setConfirmingPhase(phaseType) diff --git a/packages/client/components/RetroSidebarDiscussSection.tsx b/packages/client/components/RetroSidebarDiscussSection.tsx index c56b74d4ee6..4f1e1bedfe2 100644 --- a/packages/client/components/RetroSidebarDiscussSection.tsx +++ b/packages/client/components/RetroSidebarDiscussSection.tsx @@ -125,7 +125,9 @@ const RetroSidebarDiscussSection = (props: Props) => { } const handleClick = (id: string) => { - gotoStageId(id).catch() + gotoStageId(id).catch(() => { + /*ignore*/ + }) handleMenuClick() } return ( diff --git a/packages/client/components/TeamInvitationSSO.tsx b/packages/client/components/TeamInvitationSSO.tsx index 8f9e4c20535..4b2b70febb6 100644 --- a/packages/client/components/TeamInvitationSSO.tsx +++ b/packages/client/components/TeamInvitationSSO.tsx @@ -37,7 +37,9 @@ const TeamInvitationSSO = (props: Props) => { emitGA4SignUpEvent(ga4Args) AcceptTeamInvitationMutation(atmosphere, {invitationToken}, {history, onCompleted, onError}) } - loginWithSAML().catch() + loginWithSAML().catch(() => { + /*ignore*/ + }) }, []) useDocumentTitle('SSO Login | Team Invitation', 'Team Invitation') diff --git a/packages/client/hooks/useAutoCheckIn.ts b/packages/client/hooks/useAutoCheckIn.ts index 218f8273eeb..7580ce484b3 100644 --- a/packages/client/hooks/useAutoCheckIn.ts +++ b/packages/client/hooks/useAutoCheckIn.ts @@ -29,7 +29,9 @@ const useAutoCheckIn = (meetingRef: useAutoCheckIn_meeting$key) => { const {id: meetingId, endedAt, viewerMeetingMember} = meeting const subscribeToMeeting = () => { if (atmosphere.registerQuery) { - atmosphere.registerQuery(queryKey, MeetingSubscription, {meetingId}, router).catch() + atmosphere.registerQuery(queryKey, MeetingSubscription, {meetingId}, router).catch(() => { + /*ignore*/ + }) } } if (viewerMeetingMember) { diff --git a/packages/client/hooks/useGotoNext.ts b/packages/client/hooks/useGotoNext.ts index 0b36f685c4a..2d35c9e65c1 100644 --- a/packages/client/hooks/useGotoNext.ts +++ b/packages/client/hooks/useGotoNext.ts @@ -38,7 +38,9 @@ export const useGotoNext = ( const {stage} = nextStageRes const {id: nextStageId} = stage if (!options.isHotkey || currentStageRes.stage.isComplete) { - gotoStageId(nextStageId).catch() + gotoStageId(nextStageId).catch(() => { + /*ignore*/ + }) } else if (options.isHotkey) { ref.current && ref.current.focus() } diff --git a/packages/client/hooks/useGotoPrev.ts b/packages/client/hooks/useGotoPrev.ts index a0868e63763..d621b0fcc95 100644 --- a/packages/client/hooks/useGotoPrev.ts +++ b/packages/client/hooks/useGotoPrev.ts @@ -33,7 +33,9 @@ export const useGotoPrev = ( const { stage: {id: nextStageId} } = nextStageRes - gotoStageId(nextStageId).catch() + gotoStageId(nextStageId).catch(() => { + /*ignore*/ + }) }, [gotoStageId, meeting]) } diff --git a/packages/client/hooks/useSVG.ts b/packages/client/hooks/useSVG.ts index 8adaaf00aba..9b2913c34ac 100644 --- a/packages/client/hooks/useSVG.ts +++ b/packages/client/hooks/useSVG.ts @@ -24,7 +24,9 @@ const useSVG = (src: string, onLoad?: (el: SVGElement) => void) => { setSVG(res2) } } - fetchSVG().catch() + fetchSVG().catch(() => { + /*ignore*/ + }) return () => { isMountedRef.current = false } diff --git a/packages/client/hooks/useServiceWorkerUpdater.ts b/packages/client/hooks/useServiceWorkerUpdater.ts index cf21d4751e7..6ec801da279 100644 --- a/packages/client/hooks/useServiceWorkerUpdater.ts +++ b/packages/client/hooks/useServiceWorkerUpdater.ts @@ -28,7 +28,9 @@ const useServiceWorkerUpdater = () => { }) } if ('serviceWorker' in navigator) { - setFirstServiceWorker().catch() + setFirstServiceWorker().catch(() => { + /*ignore*/ + }) navigator.serviceWorker.addEventListener('controllerchange', onServiceWorkerChange) return () => { navigator.serviceWorker.removeEventListener('controllerchange', onServiceWorkerChange) diff --git a/packages/client/hooks/useSlackChannels.ts b/packages/client/hooks/useSlackChannels.ts index 3b0d359b060..061025a8c9d 100644 --- a/packages/client/hooks/useSlackChannels.ts +++ b/packages/client/hooks/useSlackChannels.ts @@ -41,7 +41,9 @@ const useSlackChannels = ( availableChannels.unshift({...botChannel, name: '@Parabol'}) setChannels(availableChannels) } - getChannels().catch() + getChannels().catch(() => { + /*ignore*/ + }) return () => { isMounted = false } diff --git a/packages/client/hooks/useSubscription.ts b/packages/client/hooks/useSubscription.ts index 346c849fb81..0bbc44fed59 100644 --- a/packages/client/hooks/useSubscription.ts +++ b/packages/client/hooks/useSubscription.ts @@ -15,7 +15,9 @@ const useSubscription = ( const router = {history, location} useEffect(() => { if (atmosphere.registerQuery) { - atmosphere.registerQuery(queryKey, subscription, variables, router).catch() + atmosphere.registerQuery(queryKey, subscription, variables, router).catch(() => { + /*ignore*/ + }) } return () => { if (atmosphere.scheduleUnregisterQuery) { diff --git a/packages/client/hooks/useTrebuchetEvents.ts b/packages/client/hooks/useTrebuchetEvents.ts index 0f2f9e3865e..dce94f692cb 100644 --- a/packages/client/hooks/useTrebuchetEvents.ts +++ b/packages/client/hooks/useTrebuchetEvents.ts @@ -68,7 +68,9 @@ const useTrebuchetEvents = () => { serverVersionRef.current = obj.version if ('serviceWorker' in navigator) { const registration = await navigator.serviceWorker.getRegistration() - registration?.update().catch() + registration?.update().catch(() => { + /*ignore*/ + }) } } else if (recentDisconnectsRef.current.length > 0) { // retry if reconnect and versions are the same diff --git a/packages/client/modules/email/components/SummaryEmail/ExportToCSV.tsx b/packages/client/modules/email/components/SummaryEmail/ExportToCSV.tsx index a03e79aa24f..373a01ba0b7 100644 --- a/packages/client/modules/email/components/SummaryEmail/ExportToCSV.tsx +++ b/packages/client/modules/email/components/SummaryEmail/ExportToCSV.tsx @@ -177,7 +177,9 @@ const imageStyle = { const ExportToCSV = (props: Props) => { useEffect(() => { if (props.urlAction === 'csv') { - exportToCSV().catch() + exportToCSV().catch(() => { + /*ignore*/ + }) } }, [props.urlAction]) const atmosphere = useAtmosphere() diff --git a/packages/server/billing/helpers/adjustUserCount.ts b/packages/server/billing/helpers/adjustUserCount.ts index 36623042be4..a5d6769b465 100644 --- a/packages/server/billing/helpers/adjustUserCount.ts +++ b/packages/server/billing/helpers/adjustUserCount.ts @@ -149,6 +149,8 @@ export default async function adjustUserCount( const organizations = await dataLoader.get('organizations').loadMany(orgIds) const paidOrgs = organizations.filter(isValid).filter((org) => org.stripeSubscriptionId) - handleEnterpriseOrgQuantityChanges(paidOrgs, dataLoader).catch() + handleEnterpriseOrgQuantityChanges(paidOrgs, dataLoader).catch(() => { + /*ignore*/ + }) handleTeamOrgQuantityChanges(paidOrgs).catch(Logger.error) } diff --git a/packages/server/billing/helpers/handleEnterpriseOrgQuantityChanges.ts b/packages/server/billing/helpers/handleEnterpriseOrgQuantityChanges.ts index 30b991ed905..a1e1a622e0f 100644 --- a/packages/server/billing/helpers/handleEnterpriseOrgQuantityChanges.ts +++ b/packages/server/billing/helpers/handleEnterpriseOrgQuantityChanges.ts @@ -25,8 +25,10 @@ const sendEnterpriseOverageEvent = async ( ({role}) => role && ['BILLING_LEADER', 'ORG_ADMIN'].includes(role) )! const {id: userId} = billingLeaderOrgUser - const user = await dataLoader.get('users').loadNonNull(userId) - analytics.enterpriseOverUserLimit(user, orgId) + const user = await dataLoader.get('users').load(userId) + if (user) { + analytics.enterpriseOverUserLimit(user, orgId) + } } } @@ -37,7 +39,9 @@ const handleEnterpriseOrgQuantityChanges = async ( const enterpriseOrgs = paidOrgs.filter((org) => org.tier === 'enterprise') if (enterpriseOrgs.length === 0) return for (const org of enterpriseOrgs) { - sendEnterpriseOverageEvent(org, dataLoader).catch() + sendEnterpriseOverageEvent(org, dataLoader).catch(() => { + /*ignore*/ + }) } } diff --git a/packages/server/graphql/mutations/createTask.ts b/packages/server/graphql/mutations/createTask.ts index ae62f285935..72cc7456941 100644 --- a/packages/server/graphql/mutations/createTask.ts +++ b/packages/server/graphql/mutations/createTask.ts @@ -235,7 +235,9 @@ export default { handleAddTaskNotifications(teamMembers, task, viewerId, teamId, { operationId, mutatorId - }).catch() + }).catch(() => { + /*ignore*/ + }) const meeting = meetingId ? await dataLoader.get('newMeetings').load(meetingId) : undefined const taskProperties = { diff --git a/packages/server/graphql/subscribeGraphQL.ts b/packages/server/graphql/subscribeGraphQL.ts index 5128c5f1c11..24d1e0da395 100644 --- a/packages/server/graphql/subscribeGraphQL.ts +++ b/packages/server/graphql/subscribeGraphQL.ts @@ -128,7 +128,9 @@ const subscribeGraphQL = async (req: SubscribeRequest) => { if (resubIdx !== -1) { // reinitialize the subscription connectionContext.availableResubs.splice(resubIdx, 1) - subscribeGraphQL({...req, hideErrors: true}).catch() + subscribeGraphQL({...req, hideErrors: true}).catch(() => { + /*ignore*/ + }) } else { sendGQLMessage(connectionContext, opId, 'complete', false) }