Clean up some sentry logs (#2630)

* Change prop name for sentry ingestion

* Fix test

* Add default object
zio/stable
Eric Bailey 2024-01-25 23:11:01 -06:00 committed by GitHub
parent 3371038f7d
commit bc502edae1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
39 changed files with 84 additions and 147 deletions

View File

@ -36,7 +36,7 @@ export function useOTAUpdate() {
showUpdatePopup()
} catch (e) {
logger.error('useOTAUpdate: Error while checking for update', {
error: e,
message: e,
})
}
}, [showUpdatePopup])

View File

@ -40,7 +40,7 @@ export async function requestPermissionsAndRegisterToken(
logger.DebugContext.notifications,
)
} catch (error) {
logger.error('Notifications: Failed to set push token', {error})
logger.error('Notifications: Failed to set push token', {message: error})
}
}
@ -71,7 +71,7 @@ export function registerTokenChangeHandler(
logger.DebugContext.notifications,
)
} catch (error) {
logger.error('Notifications: Failed to set push token', {error})
logger.error('Notifications: Failed to set push token', {message: error})
}
})
return () => {

View File

@ -186,7 +186,7 @@ export class ImageModel implements Omit<RNImage, 'size'> {
this.cropped = cropped
})
} catch (err) {
logger.error('Failed to crop photo', {error: err})
logger.error('Failed to crop photo', {message: err})
}
}

View File

@ -88,6 +88,6 @@ test('migrate: has legacy data, fails validation', async () => {
expect(logger.error).toHaveBeenCalledWith(
'persisted state: legacy data failed validation',
// @ts-ignore
{error: validate.error},
{message: validate.error},
)
})

View File

@ -34,7 +34,7 @@ export async function init() {
logger.log('persisted state: initialized')
} catch (e) {
logger.error('persisted state: failed to load root state from storage', {
error: e,
message: e,
})
// AsyncStorage failure, but we can still continue in memory
return defaults
@ -59,7 +59,7 @@ export async function write<K extends keyof Schema>(
})
} catch (e) {
logger.error(`persisted state: failed writing root state to storage`, {
error: e,
message: e,
})
}
}
@ -89,7 +89,7 @@ async function onBroadcastMessage({data}: MessageEvent) {
logger.error(
`persisted state: failed handling update from broadcast channel`,
{
error: e,
message: e,
},
)
}

View File

@ -127,34 +127,6 @@ export async function migrate() {
const newData = await read()
const alreadyMigrated = Boolean(newData)
/* TODO BEGIN DEBUG — remove this eventually */
try {
if (rawLegacyData) {
const legacy = JSON.parse(rawLegacyData) as Partial<LegacySchema>
logger.info(`persisted state: debug legacy data`, {
hasExistingLoggedInAccount: Boolean(legacy?.session?.data),
numberOfExistingAccounts: legacy?.session?.accounts?.length,
foundExistingCurrentAccount: Boolean(
legacy.session?.accounts?.find(
a => a.did === legacy.session?.data?.did,
),
),
})
logger.info(`persisted state: debug new data`, {
hasNewData: Boolean(newData),
hasExistingLoggedInAccount: Boolean(newData?.session?.currentAccount),
numberOfExistingAccounts: newData?.session?.accounts?.length,
existingAccountMatchesLegacy: Boolean(
newData?.session?.currentAccount?.did ===
legacy?.session?.data?.did,
),
})
}
} catch (e: any) {
logger.error(e, {message: `persisted state: legacy debugging failed`})
}
/* TODO END DEBUG */
if (!alreadyMigrated && rawLegacyData) {
logger.info('persisted state: migrating legacy storage')
@ -167,7 +139,7 @@ export async function migrate() {
logger.info('persisted state: migrated legacy storage')
} else {
logger.error('persisted state: legacy data failed validation', {
error: validate.error,
message: validate.error,
})
}
} else {
@ -185,7 +157,7 @@ export async function clearLegacyStorage() {
await AsyncStorage.removeItem(DEPRECATED_ROOT_STATE_STORAGE_KEY)
} catch (e: any) {
logger.error(`persisted legacy store: failed to clear`, {
error: e.toString(),
message: e.toString(),
})
}
}

View File

@ -22,6 +22,6 @@ export async function clear() {
try {
await AsyncStorage.removeItem(BSKY_STORAGE)
} catch (e: any) {
logger.error(`persisted store: failed to clear`, {error: e.toString()})
logger.error(`persisted store: failed to clear`, {message: e.toString()})
}
}

View File

@ -75,7 +75,7 @@ export function useActorAutocompleteFn() {
})
} catch (e) {
logger.error('useActorSearch: searchActorsTypeahead failed', {
error: e,
message: e,
})
}
}

View File

@ -138,9 +138,6 @@ function createPersistSessionHandler(
logger.info(`session: persistSession`, {
event,
did: refreshedAccount.did,
handle: refreshedAccount.handle,
service: refreshedAccount.service,
deactivated: refreshedAccount.deactivated,
})
@ -217,10 +214,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
verificationPhone,
verificationCode,
}: any) => {
logger.info(`session: creating account`, {
service,
handle,
})
logger.info(`session: creating account`)
track('Try Create Account')
const agent = new BskyAgent({service})
@ -272,14 +266,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
queryClient.clear()
upsertAccount(account)
logger.debug(
`session: created account`,
{
service,
handle,
},
logger.DebugContext.session,
)
logger.debug(`session: created account`, {}, logger.DebugContext.session)
track('Create Account')
},
[upsertAccount, queryClient, clearCurrentAccount],
@ -287,14 +274,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
const login = React.useCallback<ApiContext['login']>(
async ({service, identifier, password}) => {
logger.debug(
`session: login`,
{
service,
identifier,
},
logger.DebugContext.session,
)
logger.debug(`session: login`, {}, logger.DebugContext.session)
const agent = new BskyAgent({service})
@ -329,14 +309,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
queryClient.clear()
upsertAccount(account)
logger.debug(
`session: logged in`,
{
service,
identifier,
},
logger.DebugContext.session,
)
logger.debug(`session: logged in`, {}, logger.DebugContext.session)
track('Sign In', {resumedSession: false})
},
@ -360,14 +333,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
const initSession = React.useCallback<ApiContext['initSession']>(
async account => {
logger.debug(
`session: initSession`,
{
did: account.did,
handle: account.handle,
},
logger.DebugContext.session,
)
logger.debug(`session: initSession`, {}, logger.DebugContext.session)
const agent = new BskyAgent({
service: account.service,
@ -435,7 +401,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
* we handle that failure via `createPersistSessionHandler`
*/
logger.info(`session: resumeSessionWithFreshAccount failed`, {
error: e,
message: e,
})
__globalAgent = PUBLIC_BSKY_AGENT
@ -454,7 +420,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
* we handle that failure via `createPersistSessionHandler`
*/
logger.info(`session: resumeSessionWithFreshAccount failed`, {
error: e,
message: e,
})
__globalAgent = PUBLIC_BSKY_AGENT
@ -497,7 +463,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
await initSession(account)
}
} catch (e) {
logger.error(`session: resumeSession failed`, {error: e})
logger.error(`session: resumeSession failed`, {message: e})
} finally {
setState(s => ({
...s,
@ -613,10 +579,7 @@ export function Provider({children}: React.PropsWithChildren<{}>) {
} else if (!session.currentAccount && state.currentAccount) {
logger.debug(
`session: persisted onUpdate, logging out`,
{
did: state.currentAccount?.did,
handle: state.currentAccount?.handle,
},
{},
logger.DebugContext.session,
)

View File

@ -119,7 +119,7 @@ export async function requestVerificationCode({
} catch (e: any) {
logger.error(
`Failed to request sms verification code (${e.status} status)`,
{error: e},
{message: e},
)
uiDispatch({type: 'set-error', value: cleanError(e.toString())})
}
@ -204,9 +204,11 @@ export async function submit({
}
if ([400, 429].includes(e.status)) {
logger.warn('Failed to create account', {error: e})
logger.warn('Failed to create account', {message: e})
} else {
logger.error(`Failed to create account (${e.status} status)`, {error: e})
logger.error(`Failed to create account (${e.status} status)`, {
message: e,
})
}
uiDispatch({type: 'set-processing', value: false})

View File

@ -55,7 +55,7 @@ export function RecommendedFeedsItem({
resetRemoveFeed()
} catch (e) {
Toast.show(_(msg`There was an issue contacting your server`))
logger.error('Failed to unsave feed', {error: e})
logger.error('Failed to unsave feed', {message: e})
}
} else {
try {
@ -64,7 +64,7 @@ export function RecommendedFeedsItem({
track('Onboarding:CustomFeedAdded')
} catch (e) {
Toast.show(_(msg`There was an issue contacting your server`))
logger.error('Failed to pin feed', {error: e})
logger.error('Failed to pin feed', {message: e})
}
}
}

View File

@ -135,7 +135,7 @@ export function RecommendedFollows({next}: Props) {
}
} catch (e) {
logger.error('RecommendedFollows: failed to get suggestions', {
error: e,
message: e,
})
}
}

View File

@ -88,7 +88,7 @@ export function ProfileCard({
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('RecommendedFollows: failed to toggle following', {
error: e,
message: e,
})
}
} finally {

View File

@ -51,7 +51,7 @@ export function useExternalLinkFetch({
},
err => {
logger.error('Failed to fetch post for quote embedding', {
error: err.toString(),
message: err.toString(),
})
setExtLink(undefined)
},
@ -70,7 +70,7 @@ export function useExternalLinkFetch({
})
},
err => {
logger.error('Failed to fetch feed for embedding', {error: err})
logger.error('Failed to fetch feed for embedding', {message: err})
setExtLink(undefined)
},
)
@ -88,7 +88,7 @@ export function useExternalLinkFetch({
})
},
err => {
logger.error('Failed to fetch list for embedding', {error: err})
logger.error('Failed to fetch list for embedding', {message: err})
setExtLink(undefined)
},
)

View File

@ -111,7 +111,7 @@ export function FeedSourceCardLoaded({
Toast.show(_(msg`Removed from my feeds`))
} catch (e) {
Toast.show(_(msg`There was an issue contacting your server`))
logger.error('Failed to unsave feed', {error: e})
logger.error('Failed to unsave feed', {message: e})
}
},
})
@ -125,7 +125,7 @@ export function FeedSourceCardLoaded({
Toast.show(_(msg`Added to my feeds`))
} catch (e) {
Toast.show(_(msg`There was an issue contacting your server`))
logger.error('Failed to save feed', {error: e})
logger.error('Failed to save feed', {message: e})
}
}
}, [isSaved, openModal, feed, removeFeed, saveFeed, _, pinOnSave, pinFeed])
@ -180,7 +180,7 @@ export function FeedSourceCardLoaded({
Toast.show(
_(msg`There was an issue contacting your server`),
)
logger.error('Failed to unsave feed', {error: e})
logger.error('Failed to unsave feed', {message: e})
}
},
})

View File

@ -103,7 +103,7 @@ export const ProfileFeedgens = React.forwardRef<
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh feeds', {error: err})
logger.error('Failed to refresh feeds', {message: err})
}
setIsPTRing(false)
}, [refetch, setIsPTRing])
@ -114,7 +114,7 @@ export const ProfileFeedgens = React.forwardRef<
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more feeds', {error: err})
logger.error('Failed to load more feeds', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage])

View File

@ -103,7 +103,7 @@ export function ListMembers({
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh lists', {error: err})
logger.error('Failed to refresh lists', {message: err})
}
setIsRefreshing(false)
}, [refetch, track, setIsRefreshing])
@ -114,7 +114,7 @@ export function ListMembers({
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more lists', {error: err})
logger.error('Failed to load more lists', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage, track])

View File

@ -69,7 +69,7 @@ export function MyLists({
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh lists', {error: err})
logger.error('Failed to refresh lists', {message: err})
}
setIsPTRing(false)
}, [refetch, track, setIsPTRing])

View File

@ -106,7 +106,7 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>(
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh lists', {error: err})
logger.error('Failed to refresh lists', {message: err})
}
setIsPTRing(false)
}, [refetch, track, setIsPTRing])
@ -118,7 +118,7 @@ export const ProfileLists = React.forwardRef<SectionRef, ProfileListsProps>(
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more lists', {error: err})
logger.error('Failed to load more lists', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage, track])

View File

@ -116,7 +116,7 @@ export function Component({}: {}) {
}
} catch (e) {
Toast.show(_(msg`Failed to create app password.`), 'times')
logger.error('Failed to create app password', {error: e})
logger.error('Failed to create app password', {message: e})
}
}

View File

@ -43,7 +43,7 @@ function Inner({preferences}: {preferences: UsePreferencesQueryResponse}) {
await setBirthDate({birthDate: date})
closeModal()
} catch (e) {
logger.error(`setBirthDate failed`, {error: e})
logger.error(`setBirthDate failed`, {message: e})
}
}, [date, setBirthDate, closeModal])

View File

@ -121,7 +121,7 @@ export function Inner({
onChanged()
} catch (err: any) {
setError(cleanError(err))
logger.error('Failed to update handle', {handle, error: err})
logger.error('Failed to update handle', {handle, message: err})
} finally {
}
}, [

View File

@ -125,7 +125,7 @@ function AdultContentEnabledPref() {
Toast.show(
_(msg`There was an issue syncing your preferences with the server`),
)
logger.error('Failed to update preferences with server', {error: e})
logger.error('Failed to update preferences with server', {message: e})
}
}, [variables, preferences, mutate, _])

View File

@ -129,7 +129,7 @@ export function Component({
onUpdate?.()
closeModal()
} catch (e: any) {
logger.error('Failed to update user profile', {error: String(e)})
logger.error('Failed to update user profile', {message: String(e)})
}
}, [
track,

View File

@ -73,7 +73,7 @@ export function Feed({
await checkUnread({invalidate: true})
} catch (err) {
logger.error('Failed to refresh notifications feed', {
error: err,
message: err,
})
} finally {
setIsPTRing(false)
@ -86,7 +86,7 @@ export function Feed({
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more notifications', {error: err})
logger.error('Failed to load more notifications', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage])

View File

@ -40,7 +40,7 @@ export function PostLikedBy({uri}: {uri: string}) {
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh likes', {error: err})
logger.error('Failed to refresh likes', {message: err})
}
setIsPTRing(false)
}, [refetch, setIsPTRing])
@ -50,7 +50,7 @@ export function PostLikedBy({uri}: {uri: string}) {
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more likes', {error: err})
logger.error('Failed to load more likes', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage])

View File

@ -40,7 +40,7 @@ export function PostRepostedBy({uri}: {uri: string}) {
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh reposts', {error: err})
logger.error('Failed to refresh reposts', {message: err})
}
setIsPTRing(false)
}, [refetch, setIsPTRing])
@ -50,7 +50,7 @@ export function PostRepostedBy({uri}: {uri: string}) {
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more reposts', {error: err})
logger.error('Failed to load more reposts', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage])

View File

@ -238,7 +238,7 @@ function PostThreadLoaded({
try {
await onRefresh()
} catch (err) {
logger.error('Failed to refresh posts thread', {error: err})
logger.error('Failed to refresh posts thread', {message: err})
}
setIsPTRing(false)
}, [setIsPTRing, onRefresh])

View File

@ -120,7 +120,7 @@ let Feed = ({
onHasNew(true)
}
} catch (e) {
logger.error('Poll latest failed', {feed, error: String(e)})
logger.error('Poll latest failed', {feed, message: String(e)})
}
}, [feed, data, isFetching, onHasNew, enabled, disablePoll])
@ -216,7 +216,7 @@ let Feed = ({
await refetch()
onHasNew?.(false)
} catch (err) {
logger.error('Failed to refresh posts feed', {error: err})
logger.error('Failed to refresh posts feed', {message: err})
}
setIsPTRing(false)
}, [refetch, track, setIsPTRing, onHasNew])
@ -228,7 +228,7 @@ let Feed = ({
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more posts', {error: err})
logger.error('Failed to load more posts', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage, track])

View File

@ -139,7 +139,7 @@ function FeedgenErrorMessage({
msgLingui`There was an an issue removing this feed. Please check your internet connection and try again.`,
),
)
logger.error('Failed to remove feed', {error: err})
logger.error('Failed to remove feed', {message: err})
}
},
onPressCancel() {

View File

@ -41,7 +41,7 @@ export function ProfileFollowers({name}: {name: string}) {
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh followers', {error: err})
logger.error('Failed to refresh followers', {message: err})
}
setIsPTRing(false)
}, [refetch, setIsPTRing])
@ -51,7 +51,7 @@ export function ProfileFollowers({name}: {name: string}) {
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more followers', {error: err})
logger.error('Failed to load more followers', {message: err})
}
}

View File

@ -200,7 +200,7 @@ let ProfileHeaderLoaded = ({
)
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to follow', {error: String(e)})
logger.error('Failed to follow', {message: String(e)})
Toast.show(_(msg`There was an issue! ${e.toString()}`))
}
}
@ -221,7 +221,7 @@ let ProfileHeaderLoaded = ({
)
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to unfollow', {error: String(e)})
logger.error('Failed to unfollow', {message: String(e)})
Toast.show(_(msg`There was an issue! ${e.toString()}`))
}
}
@ -260,7 +260,7 @@ let ProfileHeaderLoaded = ({
Toast.show(_(msg`Account muted`))
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to mute account', {error: e})
logger.error('Failed to mute account', {message: e})
Toast.show(_(msg`There was an issue! ${e.toString()}`))
}
}
@ -273,7 +273,7 @@ let ProfileHeaderLoaded = ({
Toast.show(_(msg`Account unmuted`))
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to unmute account', {error: e})
logger.error('Failed to unmute account', {message: e})
Toast.show(_(msg`There was an issue! ${e.toString()}`))
}
}
@ -293,7 +293,7 @@ let ProfileHeaderLoaded = ({
Toast.show(_(msg`Account blocked`))
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to block account', {error: e})
logger.error('Failed to block account', {message: e})
Toast.show(_(msg`There was an issue! ${e.toString()}`))
}
}
@ -315,7 +315,7 @@ let ProfileHeaderLoaded = ({
Toast.show(_(msg`Account unblocked`))
} catch (e: any) {
if (e?.name !== 'AbortError') {
logger.error('Failed to unblock account', {error: e})
logger.error('Failed to unblock account', {message: e})
Toast.show(_(msg`There was an issue! ${e.toString()}`))
}
}

View File

@ -82,7 +82,7 @@ let PostDropdownBtn = ({
Toast.show(_(msg`Post deleted`))
},
e => {
logger.error('Failed to delete post', {error: e})
logger.error('Failed to delete post', {message: e})
Toast.show(_(msg`Failed to delete post, please try again`))
},
)
@ -99,7 +99,7 @@ let PostDropdownBtn = ({
Toast.show(_(msg`You will now receive notifications for this thread`))
}
} catch (e) {
logger.error('Failed to toggle thread mute', {error: e})
logger.error('Failed to toggle thread mute', {message: e})
}
}, [rootUri, toggleThreadMute, _])

View File

@ -66,7 +66,7 @@ export function ModerationBlockedAccounts({}: Props) {
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh my muted accounts', {error: err})
logger.error('Failed to refresh my muted accounts', {message: err})
}
setIsPTRing(false)
}, [refetch, setIsPTRing])
@ -77,7 +77,7 @@ export function ModerationBlockedAccounts({}: Props) {
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more of my muted accounts', {error: err})
logger.error('Failed to load more of my muted accounts', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage])

View File

@ -66,7 +66,7 @@ export function ModerationMutedAccounts({}: Props) {
try {
await refetch()
} catch (err) {
logger.error('Failed to refresh my muted accounts', {error: err})
logger.error('Failed to refresh my muted accounts', {message: err})
}
setIsPTRing(false)
}, [refetch, setIsPTRing])
@ -77,7 +77,7 @@ export function ModerationMutedAccounts({}: Props) {
try {
await fetchNextPage()
} catch (err) {
logger.error('Failed to load more of my muted accounts', {error: err})
logger.error('Failed to load more of my muted accounts', {message: err})
}
}, [isFetching, hasNextPage, isError, fetchNextPage])

View File

@ -209,7 +209,7 @@ export function ProfileFeedScreenInner({
msg`There was an an issue updating your feeds, please check your internet connection and try again.`,
),
)
logger.error('Failed up update feeds', {error: err})
logger.error('Failed up update feeds', {message: err})
}
}, [
feedInfo,
@ -234,7 +234,7 @@ export function ProfileFeedScreenInner({
}
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
logger.error('Failed to toggle pinned feed', {error: e})
logger.error('Failed to toggle pinned feed', {message: e})
}
}, [isPinned, feedInfo, pinFeed, unpinFeed, resetPinFeed, resetUnpinFeed, _])
@ -549,7 +549,7 @@ function AboutSection({
msg`There was an an issue contacting the server, please check your internet connection and try again.`,
),
)
logger.error('Failed up toggle like', {error: err})
logger.error('Failed up toggle like', {message: err})
}
}, [likeUri, isLiked, feedInfo, likeFeed, unlikeFeed, track, _])

View File

@ -261,7 +261,7 @@ function Header({rkey, list}: {rkey: string; list: AppBskyGraphDefs.ListView}) {
}
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
logger.error('Failed to toggle pinned feed', {error: e})
logger.error('Failed to toggle pinned feed', {message: e})
}
}, [list.uri, isPinned, pinFeed, unpinFeed, _])

View File

@ -207,7 +207,7 @@ function ListItem({
}
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
logger.error('Failed to toggle pinned feed', {error: e})
logger.error('Failed to toggle pinned feed', {message: e})
}
}, [feedUri, isPinned, pinFeed, unpinFeed, resetSaveFeedsMutationState, _])
@ -229,7 +229,7 @@ function ListItem({
})
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
logger.error('Failed to set pinned feed order', {error: e})
logger.error('Failed to set pinned feed order', {message: e})
}
}, [feedUri, isPinned, setSavedFeeds, currentFeeds, _])
@ -250,7 +250,7 @@ function ListItem({
})
} catch (e) {
Toast.show(_(msg`There was an issue contacting the server`))
logger.error('Failed to set pinned feed order', {error: e})
logger.error('Failed to set pinned feed order', {message: e})
}
}, [feedUri, isPinned, setSavedFeeds, currentFeeds, _])

View File

@ -153,7 +153,7 @@ function SearchScreenSuggestedFollows() {
getSuggestions()
} catch (e) {
logger.error(`SearchScreenSuggestedFollows: failed to get suggestions`, {
error: e,
message: e,
})
}
}, [currentAccount, setSuggestions, getSuggestedFollowsByActor])
@ -480,7 +480,7 @@ export function SearchScreen(
setSearchHistory(JSON.parse(history))
}
} catch (e: any) {
logger.error('Failed to load search history', e)
logger.error('Failed to load search history', {message: e})
}
}
@ -558,7 +558,7 @@ export function SearchScreen(
JSON.stringify(newHistory),
)
} catch (e: any) {
logger.error('Failed to save search history', e)
logger.error('Failed to save search history', {message: e})
}
}
},
@ -598,7 +598,7 @@ export function SearchScreen(
setSearchHistory(updatedHistory)
AsyncStorage.setItem('searchHistory', JSON.stringify(updatedHistory)).catch(
e => {
logger.error('Failed to update search history', e)
logger.error('Failed to update search history', {message: e})
},
)
}