Log onboarding errors for suggested accounts (#9892)
This commit is contained in:
@@ -9,6 +9,7 @@ import * as bcp47Match from 'bcp-47-match'
|
|||||||
import {wait} from '#/lib/async/wait'
|
import {wait} from '#/lib/async/wait'
|
||||||
import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
|
import {popularInterests, useInterestsDisplayNames} from '#/lib/interests'
|
||||||
import {isBlockedOrBlocking, isMuted} from '#/lib/moderation/blocked-and-muted'
|
import {isBlockedOrBlocking, isMuted} from '#/lib/moderation/blocked-and-muted'
|
||||||
|
import {logger} from '#/logger'
|
||||||
import {updateProfileShadow} from '#/state/cache/profile-shadow'
|
import {updateProfileShadow} from '#/state/cache/profile-shadow'
|
||||||
import {useLanguagePrefs} from '#/state/preferences'
|
import {useLanguagePrefs} from '#/state/preferences'
|
||||||
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
import {useModerationOpts} from '#/state/preferences/moderation-opts'
|
||||||
@@ -128,7 +129,13 @@ export function StepSuggestedAccounts() {
|
|||||||
toast.show(_(msg`Followed all accounts!`), {type: 'success'})
|
toast.show(_(msg`Followed all accounts!`), {type: 'success'})
|
||||||
setFollowedUsers(followed => [...followed, ...newlyFollowed])
|
setFollowedUsers(followed => [...followed, ...newlyFollowed])
|
||||||
},
|
},
|
||||||
onError: () => {
|
onError: e => {
|
||||||
|
logger.error(
|
||||||
|
'Failed to follow all suggested accounts during onboarding',
|
||||||
|
{
|
||||||
|
safeMessage: e,
|
||||||
|
},
|
||||||
|
)
|
||||||
toast.show(
|
toast.show(
|
||||||
_(msg`Failed to follow all suggested accounts, please try again`),
|
_(msg`Failed to follow all suggested accounts, please try again`),
|
||||||
{type: 'error'},
|
{type: 'error'},
|
||||||
@@ -156,6 +163,14 @@ export function StepSuggestedAccounts() {
|
|||||||
[ax, selectedInterest, suggestedUsers?.recId],
|
[ax, selectedInterest, suggestedUsers?.recId],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (error) {
|
||||||
|
logger.error('Failed to fetch suggested accounts during onboarding', {
|
||||||
|
safeMessage: error,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}, [error])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={[a.align_start, a.gap_sm]} testID="onboardingInterests">
|
<View style={[a.align_start, a.gap_sm]} testID="onboardingInterests">
|
||||||
<OnboardingPosition />
|
<OnboardingPosition />
|
||||||
|
|||||||
Reference in New Issue
Block a user