Fix other error logs while I'm at it
parent
df0dcf32f9
commit
7e29ebbadb
|
@ -22,7 +22,7 @@ export function useFollowProfile(profile: AppBskyActorDefs.ProfileViewBasic) {
|
||||||
following: false,
|
following: false,
|
||||||
}
|
}
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
store.log.error('Failed to delete follow', e)
|
store.log.error('Failed to delete follow', {error: e})
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
} else if (state === FollowState.NotFollowing) {
|
} else if (state === FollowState.NotFollowing) {
|
||||||
|
@ -40,7 +40,7 @@ export function useFollowProfile(profile: AppBskyActorDefs.ProfileViewBasic) {
|
||||||
following: true,
|
following: true,
|
||||||
}
|
}
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
store.log.error('Failed to create follow', e)
|
store.log.error('Failed to create follow', {error: e})
|
||||||
throw e
|
throw e
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,7 @@ export async function setupState(serviceUri = DEFAULT_SERVICE) {
|
||||||
rootStore.log.debug('Initial hydrate', {hasSession: !!data.session})
|
rootStore.log.debug('Initial hydrate', {hasSession: !!data.session})
|
||||||
rootStore.hydrate(data)
|
rootStore.hydrate(data)
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
rootStore.log.error('Failed to load state from storage', e)
|
rootStore.log.error('Failed to load state from storage', {error: e})
|
||||||
}
|
}
|
||||||
rootStore.attemptSessionResumption()
|
rootStore.attemptSessionResumption()
|
||||||
|
|
||||||
|
|
|
@ -163,7 +163,7 @@ export class PostThreadModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch post thread', err)
|
this.rootStore.log.error('Failed to fetch post thread', {error: err})
|
||||||
}
|
}
|
||||||
this.notFound = err instanceof GetPostThread.NotFoundError
|
this.notFound = err instanceof GetPostThread.NotFoundError
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,7 +235,7 @@ export class ProfileModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch profile', err)
|
this.rootStore.log.error('Failed to fetch profile', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -120,7 +120,7 @@ export class FeedsDiscoveryModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch popular feeds', err)
|
this.rootStore.log.error('Failed to fetch popular feeds', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -144,7 +144,7 @@ export class SuggestedActorsModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch suggested actors', err)
|
this.rootStore.log.error('Failed to fetch suggested actors', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -401,7 +401,9 @@ export class NotificationsFeedModel {
|
||||||
this._setQueued(this._filterNotifications(queueModels))
|
this._setQueued(this._filterNotifications(queueModels))
|
||||||
this._countUnread()
|
this._countUnread()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this.rootStore.log.error('NotificationsModel:syncQueue failed', {e})
|
this.rootStore.log.error('NotificationsModel:syncQueue failed', {
|
||||||
|
error: e,
|
||||||
|
})
|
||||||
} finally {
|
} finally {
|
||||||
this.lock.release()
|
this.lock.release()
|
||||||
}
|
}
|
||||||
|
@ -481,7 +483,9 @@ export class NotificationsFeedModel {
|
||||||
this.lastSync ? this.lastSync.toISOString() : undefined,
|
this.lastSync ? this.lastSync.toISOString() : undefined,
|
||||||
)
|
)
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this.rootStore.log.warn('Failed to update notifications read state', e)
|
this.rootStore.log.warn('Failed to update notifications read state', {
|
||||||
|
error: e,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,13 +505,12 @@ export class NotificationsFeedModel {
|
||||||
this.error = cleanError(error)
|
this.error = cleanError(error)
|
||||||
this.loadMoreError = cleanError(loadMoreError)
|
this.loadMoreError = cleanError(loadMoreError)
|
||||||
if (error) {
|
if (error) {
|
||||||
this.rootStore.log.error('Failed to fetch notifications', error)
|
this.rootStore.log.error('Failed to fetch notifications', {error})
|
||||||
}
|
}
|
||||||
if (loadMoreError) {
|
if (loadMoreError) {
|
||||||
this.rootStore.log.error(
|
this.rootStore.log.error('Failed to load more notifications', {
|
||||||
'Failed to load more notifications',
|
error: loadMoreError,
|
||||||
loadMoreError,
|
})
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -51,7 +51,7 @@ export class PostsFeedItemModel {
|
||||||
this.richText = undefined
|
this.richText = undefined
|
||||||
rootStore.log.warn(
|
rootStore.log.warn(
|
||||||
'app.bsky.feed.getTimeline or app.bsky.feed.getAuthorFeed served an unexpected record type',
|
'app.bsky.feed.getTimeline or app.bsky.feed.getAuthorFeed served an unexpected record type',
|
||||||
this.post.record,
|
{record: this.post.record},
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
this.reply = v.reply
|
this.reply = v.reply
|
||||||
|
|
|
@ -324,13 +324,12 @@ export class PostsFeedModel {
|
||||||
this.knownError = detectKnownError(this.feedType, error)
|
this.knownError = detectKnownError(this.feedType, error)
|
||||||
this.loadMoreError = cleanError(loadMoreError)
|
this.loadMoreError = cleanError(loadMoreError)
|
||||||
if (error) {
|
if (error) {
|
||||||
this.rootStore.log.error('Posts feed request failed', error)
|
this.rootStore.log.error('Posts feed request failed', {error})
|
||||||
}
|
}
|
||||||
if (loadMoreError) {
|
if (loadMoreError) {
|
||||||
this.rootStore.log.error(
|
this.rootStore.log.error('Posts feed load-more request failed', {
|
||||||
'Posts feed load-more request failed',
|
error: loadMoreError,
|
||||||
loadMoreError,
|
})
|
||||||
)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -98,7 +98,7 @@ export class ActorFeedsModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch user followers', err)
|
this.rootStore.log.error('Failed to fetch user followers', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ export class BlockedAccountsModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch user followers', err)
|
this.rootStore.log.error('Failed to fetch user followers', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -97,7 +97,7 @@ export class LikesModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch likes', err)
|
this.rootStore.log.error('Failed to fetch likes', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,10 +204,12 @@ export class ListsListModel {
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
this.loadMoreError = cleanError(loadMoreErr)
|
this.loadMoreError = cleanError(loadMoreErr)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch user lists', err)
|
this.rootStore.log.error('Failed to fetch user lists', {error: err})
|
||||||
}
|
}
|
||||||
if (loadMoreErr) {
|
if (loadMoreErr) {
|
||||||
this.rootStore.log.error('Failed to fetch user lists', loadMoreErr)
|
this.rootStore.log.error('Failed to fetch user lists', {
|
||||||
|
error: loadMoreErr,
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ export class MutedAccountsModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch user followers', err)
|
this.rootStore.log.error('Failed to fetch user followers', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -100,7 +100,7 @@ export class RepostedByModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch reposted by view', err)
|
this.rootStore.log.error('Failed to fetch reposted by view', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -99,7 +99,7 @@ export class UserFollowersModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch user followers', err)
|
this.rootStore.log.error('Failed to fetch user followers', {error: err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -130,7 +130,7 @@ export class RootStoreModel {
|
||||||
})
|
})
|
||||||
this.updateSessionState()
|
this.updateSessionState()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this.log.warn('Failed to initialize session', e)
|
this.log.warn('Failed to initialize session', {error: e})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -184,7 +184,7 @@ export class RootStoreModel {
|
||||||
await this.me.updateIfNeeded()
|
await this.me.updateIfNeeded()
|
||||||
await this.preferences.sync()
|
await this.preferences.sync()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
this.log.error('Failed to fetch latest state', e)
|
this.log.error('Failed to fetch latest state', {error: e})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ export class CreateAccountModel {
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
this.rootStore.log.warn(
|
this.rootStore.log.warn(
|
||||||
`Failed to fetch service description for ${this.serviceUrl}`,
|
`Failed to fetch service description for ${this.serviceUrl}`,
|
||||||
err,
|
{error: err},
|
||||||
)
|
)
|
||||||
this.setError(
|
this.setError(
|
||||||
'Unable to contact your service. Please check your Internet connection.',
|
'Unable to contact your service. Please check your Internet connection.',
|
||||||
|
@ -127,7 +127,7 @@ export class CreateAccountModel {
|
||||||
errMsg =
|
errMsg =
|
||||||
'Invite code not accepted. Check that you input it correctly and try again.'
|
'Invite code not accepted. Check that you input it correctly and try again.'
|
||||||
}
|
}
|
||||||
this.rootStore.log.error('Failed to create account', e)
|
this.rootStore.log.error('Failed to create account', {error: e})
|
||||||
this.setIsProcessing(false)
|
this.setIsProcessing(false)
|
||||||
this.setError(cleanError(errMsg))
|
this.setError(cleanError(errMsg))
|
||||||
throw e
|
throw e
|
||||||
|
|
|
@ -223,10 +223,14 @@ export class ProfileUiModel {
|
||||||
await Promise.all([
|
await Promise.all([
|
||||||
this.profile
|
this.profile
|
||||||
.setup()
|
.setup()
|
||||||
.catch(err => this.rootStore.log.error('Failed to fetch profile', err)),
|
.catch(err =>
|
||||||
|
this.rootStore.log.error('Failed to fetch profile', {error: err}),
|
||||||
|
),
|
||||||
this.feed
|
this.feed
|
||||||
.setup()
|
.setup()
|
||||||
.catch(err => this.rootStore.log.error('Failed to fetch feed', err)),
|
.catch(err =>
|
||||||
|
this.rootStore.log.error('Failed to fetch feed', {error: err}),
|
||||||
|
),
|
||||||
])
|
])
|
||||||
runInAction(() => {
|
runInAction(() => {
|
||||||
this.isAuthenticatedUser =
|
this.isAuthenticatedUser =
|
||||||
|
@ -237,7 +241,9 @@ export class ProfileUiModel {
|
||||||
this.lists.source = this.profile.did
|
this.lists.source = this.profile.did
|
||||||
this.lists
|
this.lists
|
||||||
.loadMore()
|
.loadMore()
|
||||||
.catch(err => this.rootStore.log.error('Failed to fetch lists', err))
|
.catch(err =>
|
||||||
|
this.rootStore.log.error('Failed to fetch lists', {error: err}),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
async refresh() {
|
async refresh() {
|
||||||
|
|
|
@ -126,7 +126,7 @@ export class SavedFeedsModel {
|
||||||
this.hasLoaded = true
|
this.hasLoaded = true
|
||||||
this.error = cleanError(err)
|
this.error = cleanError(err)
|
||||||
if (err) {
|
if (err) {
|
||||||
this.rootStore.log.error('Failed to fetch user feeds', err)
|
this.rootStore.log.error('Failed to fetch user feeds', {err})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ export const Login = ({onPressBack}: {onPressBack: () => void}) => {
|
||||||
}
|
}
|
||||||
store.log.warn(
|
store.log.warn(
|
||||||
`Failed to fetch service description for ${serviceUrl}`,
|
`Failed to fetch service description for ${serviceUrl}`,
|
||||||
err,
|
{error: err},
|
||||||
)
|
)
|
||||||
setError(
|
setError(
|
||||||
'Unable to contact your service. Please check your Internet connection.',
|
'Unable to contact your service. Please check your Internet connection.',
|
||||||
|
@ -349,7 +349,7 @@ const LoginForm = ({
|
||||||
})
|
})
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
const errMsg = e.toString()
|
const errMsg = e.toString()
|
||||||
store.log.warn('Failed to login', e)
|
store.log.warn('Failed to login', {error: e})
|
||||||
setIsProcessing(false)
|
setIsProcessing(false)
|
||||||
if (errMsg.includes('Authentication Required')) {
|
if (errMsg.includes('Authentication Required')) {
|
||||||
setError('Invalid username or password')
|
setError('Invalid username or password')
|
||||||
|
@ -578,7 +578,7 @@ const ForgotPasswordForm = ({
|
||||||
onEmailSent()
|
onEmailSent()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
const errMsg = e.toString()
|
const errMsg = e.toString()
|
||||||
store.log.warn('Failed to request password reset', e)
|
store.log.warn('Failed to request password reset', {error: e})
|
||||||
setIsProcessing(false)
|
setIsProcessing(false)
|
||||||
if (isNetworkError(e)) {
|
if (isNetworkError(e)) {
|
||||||
setError(
|
setError(
|
||||||
|
@ -734,7 +734,7 @@ const SetNewPasswordForm = ({
|
||||||
onPasswordSet()
|
onPasswordSet()
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
const errMsg = e.toString()
|
const errMsg = e.toString()
|
||||||
store.log.warn('Failed to set new password', e)
|
store.log.warn('Failed to set new password', {error: e})
|
||||||
setIsProcessing(false)
|
setIsProcessing(false)
|
||||||
if (isNetworkError(e)) {
|
if (isNetworkError(e)) {
|
||||||
setError(
|
setError(
|
||||||
|
|
|
@ -39,7 +39,7 @@ export function OpenCameraBtn({gallery}: Props) {
|
||||||
gallery.add(img)
|
gallery.add(img)
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
// ignore
|
// ignore
|
||||||
store.log.warn('Error using camera', err)
|
store.log.warn('Error using camera', {error: err})
|
||||||
}
|
}
|
||||||
}, [gallery, track, store, requestCameraAccessIfNeeded])
|
}, [gallery, track, store, requestCameraAccessIfNeeded])
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,9 @@ export function useExternalLinkFetch({
|
||||||
setExtLink(undefined)
|
setExtLink(undefined)
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
store.log.error('Failed to fetch post for quote embedding', {err})
|
store.log.error('Failed to fetch post for quote embedding', {
|
||||||
|
error: err,
|
||||||
|
})
|
||||||
setExtLink(undefined)
|
setExtLink(undefined)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -64,7 +66,7 @@ export function useExternalLinkFetch({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
store.log.error('Failed to fetch feed for embedding', {err})
|
store.log.error('Failed to fetch feed for embedding', {error: err})
|
||||||
setExtLink(undefined)
|
setExtLink(undefined)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
@ -82,7 +84,7 @@ export function useExternalLinkFetch({
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
store.log.error('Failed to fetch list for embedding', {err})
|
store.log.error('Failed to fetch list for embedding', {error: err})
|
||||||
setExtLink(undefined)
|
setExtLink(undefined)
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
|
@ -45,7 +45,7 @@ export const FeedSourceCard = observer(function FeedSourceCardImpl({
|
||||||
Toast.show('Removed from my feeds')
|
Toast.show('Removed from my feeds')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Toast.show('There was an issue contacting your server')
|
Toast.show('There was an issue contacting your server')
|
||||||
store.log.error('Failed to unsave feed', {e})
|
store.log.error('Failed to unsave feed', {error: e})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
@ -55,7 +55,7 @@ export const FeedSourceCard = observer(function FeedSourceCardImpl({
|
||||||
Toast.show('Added to my feeds')
|
Toast.show('Added to my feeds')
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Toast.show('There was an issue contacting your server')
|
Toast.show('There was an issue contacting your server')
|
||||||
store.log.error('Failed to save feed', {e})
|
store.log.error('Failed to save feed', {error: e})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, [store, item])
|
}, [store, item])
|
||||||
|
|
|
@ -95,7 +95,7 @@ export function Component({}: {}) {
|
||||||
}
|
}
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
Toast.show('Failed to create app password.')
|
Toast.show('Failed to create app password.')
|
||||||
store.log.error('Failed to create app password', {e})
|
store.log.error('Failed to create app password', {error: e})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ export function Component({onChanged}: {onChanged: () => void}) {
|
||||||
`Failed to fetch service description for ${String(
|
`Failed to fetch service description for ${String(
|
||||||
store.agent.service,
|
store.agent.service,
|
||||||
)}`,
|
)}`,
|
||||||
err,
|
{error: err},
|
||||||
)
|
)
|
||||||
setError(
|
setError(
|
||||||
'Unable to contact your service. Please check your Internet connection.',
|
'Unable to contact your service. Please check your Internet connection.',
|
||||||
|
@ -113,7 +113,7 @@ export function Component({onChanged}: {onChanged: () => void}) {
|
||||||
onChanged()
|
onChanged()
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
setError(cleanError(err))
|
setError(cleanError(err))
|
||||||
store.log.error('Failed to update handle', {handle, err})
|
store.log.error('Failed to update handle', {handle, error: err})
|
||||||
} finally {
|
} finally {
|
||||||
setProcessing(false)
|
setProcessing(false)
|
||||||
}
|
}
|
||||||
|
@ -343,7 +343,7 @@ function CustomHandleForm({
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
setError(cleanError(err))
|
setError(cleanError(err))
|
||||||
store.log.error('Failed to verify domain', {handle, err})
|
store.log.error('Failed to verify domain', {handle, error: err})
|
||||||
} finally {
|
} finally {
|
||||||
setIsVerifying(false)
|
setIsVerifying(false)
|
||||||
}
|
}
|
||||||
|
|
|
@ -103,7 +103,7 @@ const AdultContentEnabledPref = observer(
|
||||||
Toast.show(
|
Toast.show(
|
||||||
'There was an issue syncing your preferences with the server',
|
'There was an issue syncing your preferences with the server',
|
||||||
)
|
)
|
||||||
store.log.error('Failed to update preferences with server', {e})
|
store.log.error('Failed to update preferences with server', {error: e})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -168,7 +168,7 @@ const ContentLabelPref = observer(function ContentLabelPrefImpl({
|
||||||
Toast.show(
|
Toast.show(
|
||||||
'There was an issue syncing your preferences with the server',
|
'There was an issue syncing your preferences with the server',
|
||||||
)
|
)
|
||||||
store.log.error('Failed to update preferences with server', {e})
|
store.log.error('Failed to update preferences with server', {error: e})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[store, group],
|
[store, group],
|
||||||
|
|
|
@ -62,7 +62,7 @@ export const Component = observer(function UserAddRemoveListsImpl({
|
||||||
setMembershipsLoaded(true)
|
setMembershipsLoaded(true)
|
||||||
},
|
},
|
||||||
err => {
|
err => {
|
||||||
store.log.error('Failed to fetch memberships', {err})
|
store.log.error('Failed to fetch memberships', {error: err})
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
}, [memberships, listsList, store, setSelected, setMembershipsLoaded])
|
}, [memberships, listsList, store, setSelected, setMembershipsLoaded])
|
||||||
|
@ -76,7 +76,7 @@ export const Component = observer(function UserAddRemoveListsImpl({
|
||||||
try {
|
try {
|
||||||
changes = await memberships.updateTo(selected)
|
changes = await memberships.updateTo(selected)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
store.log.error('Failed to update memberships', {err})
|
store.log.error('Failed to update memberships', {error: err})
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
Toast.show('Lists updated')
|
Toast.show('Lists updated')
|
||||||
|
|
|
@ -18,7 +18,9 @@ export const PostLikedBy = observer(function PostLikedByImpl({
|
||||||
const view = React.useMemo(() => new LikesModel(store, {uri}), [store, uri])
|
const view = React.useMemo(() => new LikesModel(store, {uri}), [store, uri])
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
view.loadMore().catch(err => store.log.error('Failed to fetch likes', err))
|
view
|
||||||
|
.loadMore()
|
||||||
|
.catch(err => store.log.error('Failed to fetch likes', {error: err}))
|
||||||
}, [view, store.log])
|
}, [view, store.log])
|
||||||
|
|
||||||
const onRefresh = () => {
|
const onRefresh = () => {
|
||||||
|
@ -27,7 +29,9 @@ export const PostLikedBy = observer(function PostLikedByImpl({
|
||||||
const onEndReached = () => {
|
const onEndReached = () => {
|
||||||
view
|
view
|
||||||
.loadMore()
|
.loadMore()
|
||||||
.catch(err => view?.rootStore.log.error('Failed to load more likes', err))
|
.catch(err =>
|
||||||
|
view?.rootStore.log.error('Failed to load more likes', {error: err}),
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!view.hasLoaded) {
|
if (!view.hasLoaded) {
|
||||||
|
|
|
@ -23,7 +23,7 @@ export const PostRepostedBy = observer(function PostRepostedByImpl({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
view
|
view
|
||||||
.loadMore()
|
.loadMore()
|
||||||
.catch(err => store.log.error('Failed to fetch reposts', err))
|
.catch(err => store.log.error('Failed to fetch reposts', {error: err}))
|
||||||
}, [view, store.log])
|
}, [view, store.log])
|
||||||
|
|
||||||
const onRefresh = () => {
|
const onRefresh = () => {
|
||||||
|
@ -33,7 +33,7 @@ export const PostRepostedBy = observer(function PostRepostedByImpl({
|
||||||
view
|
view
|
||||||
.loadMore()
|
.loadMore()
|
||||||
.catch(err =>
|
.catch(err =>
|
||||||
view?.rootStore.log.error('Failed to load more reposts', err),
|
view?.rootStore.log.error('Failed to load more reposts', {error: err}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ function FeedgenErrorMessage({
|
||||||
Toast.show(
|
Toast.show(
|
||||||
'There was an an issue removing this feed. Please check your internet connection and try again.',
|
'There was an an issue removing this feed. Please check your internet connection and try again.',
|
||||||
)
|
)
|
||||||
store.log.error('Failed to remove feed', {err})
|
store.log.error('Failed to remove feed', {error: err})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onPressCancel() {
|
onPressCancel() {
|
||||||
|
|
|
@ -26,18 +26,20 @@ export const ProfileFollowers = observer(function ProfileFollowers({
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
view
|
view
|
||||||
.loadMore()
|
.loadMore()
|
||||||
.catch(err => store.log.error('Failed to fetch user followers', err))
|
.catch(err =>
|
||||||
|
store.log.error('Failed to fetch user followers', {error: err}),
|
||||||
|
)
|
||||||
}, [view, store.log])
|
}, [view, store.log])
|
||||||
|
|
||||||
const onRefresh = () => {
|
const onRefresh = () => {
|
||||||
view.refresh()
|
view.refresh()
|
||||||
}
|
}
|
||||||
const onEndReached = () => {
|
const onEndReached = () => {
|
||||||
view
|
view.loadMore().catch(err =>
|
||||||
.loadMore()
|
view?.rootStore.log.error('Failed to load more followers', {
|
||||||
.catch(err =>
|
error: err,
|
||||||
view?.rootStore.log.error('Failed to load more followers', err),
|
}),
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!view.hasLoaded) {
|
if (!view.hasLoaded) {
|
||||||
|
|
|
@ -150,7 +150,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoadedImpl({
|
||||||
: 'ProfileHeader:UnfollowButtonClicked',
|
: 'ProfileHeader:UnfollowButtonClicked',
|
||||||
)
|
)
|
||||||
},
|
},
|
||||||
err => store.log.error('Failed to toggle follow', err),
|
err => store.log.error('Failed to toggle follow', {error: err}),
|
||||||
)
|
)
|
||||||
}, [track, view, store.log, setShowSuggestedFollows])
|
}, [track, view, store.log, setShowSuggestedFollows])
|
||||||
|
|
||||||
|
@ -193,7 +193,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoadedImpl({
|
||||||
await view.muteAccount()
|
await view.muteAccount()
|
||||||
Toast.show('Account muted')
|
Toast.show('Account muted')
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
store.log.error('Failed to mute account', e)
|
store.log.error('Failed to mute account', {error: e})
|
||||||
Toast.show(`There was an issue! ${e.toString()}`)
|
Toast.show(`There was an issue! ${e.toString()}`)
|
||||||
}
|
}
|
||||||
}, [track, view, store])
|
}, [track, view, store])
|
||||||
|
@ -204,7 +204,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoadedImpl({
|
||||||
await view.unmuteAccount()
|
await view.unmuteAccount()
|
||||||
Toast.show('Account unmuted')
|
Toast.show('Account unmuted')
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
store.log.error('Failed to unmute account', e)
|
store.log.error('Failed to unmute account', {error: e})
|
||||||
Toast.show(`There was an issue! ${e.toString()}`)
|
Toast.show(`There was an issue! ${e.toString()}`)
|
||||||
}
|
}
|
||||||
}, [track, view, store])
|
}, [track, view, store])
|
||||||
|
@ -222,7 +222,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoadedImpl({
|
||||||
onRefreshAll()
|
onRefreshAll()
|
||||||
Toast.show('Account blocked')
|
Toast.show('Account blocked')
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
store.log.error('Failed to block account', e)
|
store.log.error('Failed to block account', {error: e})
|
||||||
Toast.show(`There was an issue! ${e.toString()}`)
|
Toast.show(`There was an issue! ${e.toString()}`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -242,7 +242,7 @@ const ProfileHeaderLoaded = observer(function ProfileHeaderLoadedImpl({
|
||||||
onRefreshAll()
|
onRefreshAll()
|
||||||
Toast.show('Account unblocked')
|
Toast.show('Account unblocked')
|
||||||
} catch (e: any) {
|
} catch (e: any) {
|
||||||
store.log.error('Failed to unblock account', e)
|
store.log.error('Failed to unblock account', {error: e})
|
||||||
Toast.show(`There was an issue! ${e.toString()}`)
|
Toast.show(`There was an issue! ${e.toString()}`)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
|
@ -52,7 +52,7 @@ export const ModerationBlockedAccounts = withAuthRequired(
|
||||||
blockedAccounts
|
blockedAccounts
|
||||||
.loadMore()
|
.loadMore()
|
||||||
.catch(err =>
|
.catch(err =>
|
||||||
store.log.error('Failed to load more blocked accounts', err),
|
store.log.error('Failed to load more blocked accounts', {error: err}),
|
||||||
)
|
)
|
||||||
}, [blockedAccounts, store])
|
}, [blockedAccounts, store])
|
||||||
|
|
||||||
|
|
|
@ -49,7 +49,7 @@ export const ModerationMutedAccounts = withAuthRequired(
|
||||||
mutedAccounts
|
mutedAccounts
|
||||||
.loadMore()
|
.loadMore()
|
||||||
.catch(err =>
|
.catch(err =>
|
||||||
store.log.error('Failed to load more muted accounts', err),
|
store.log.error('Failed to load more muted accounts', {error: err}),
|
||||||
)
|
)
|
||||||
}, [mutedAccounts, store])
|
}, [mutedAccounts, store])
|
||||||
|
|
||||||
|
|
|
@ -108,15 +108,15 @@ export const ProfileScreen = withAuthRequired(
|
||||||
uiState
|
uiState
|
||||||
.refresh()
|
.refresh()
|
||||||
.catch((err: any) =>
|
.catch((err: any) =>
|
||||||
store.log.error('Failed to refresh user profile', err),
|
store.log.error('Failed to refresh user profile', {error: err}),
|
||||||
)
|
)
|
||||||
}, [uiState, store])
|
}, [uiState, store])
|
||||||
const onEndReached = React.useCallback(() => {
|
const onEndReached = React.useCallback(() => {
|
||||||
uiState
|
uiState.loadMore().catch((err: any) =>
|
||||||
.loadMore()
|
store.log.error('Failed to load more entries in user profile', {
|
||||||
.catch((err: any) =>
|
error: err,
|
||||||
store.log.error('Failed to load more entries in user profile', err),
|
}),
|
||||||
)
|
)
|
||||||
}, [uiState, store])
|
}, [uiState, store])
|
||||||
const onPressTryAgain = React.useCallback(() => {
|
const onPressTryAgain = React.useCallback(() => {
|
||||||
uiState.setup()
|
uiState.setup()
|
||||||
|
|
|
@ -165,7 +165,7 @@ export const ProfileFeedScreenInner = observer(
|
||||||
Toast.show(
|
Toast.show(
|
||||||
'There was an an issue updating your feeds, please check your internet connection and try again.',
|
'There was an an issue updating your feeds, please check your internet connection and try again.',
|
||||||
)
|
)
|
||||||
store.log.error('Failed up update feeds', {err})
|
store.log.error('Failed up update feeds', {error: err})
|
||||||
}
|
}
|
||||||
}, [store, feedInfo])
|
}, [store, feedInfo])
|
||||||
|
|
||||||
|
@ -181,7 +181,7 @@ export const ProfileFeedScreenInner = observer(
|
||||||
Toast.show(
|
Toast.show(
|
||||||
'There was an an issue contacting the server, please check your internet connection and try again.',
|
'There was an an issue contacting the server, please check your internet connection and try again.',
|
||||||
)
|
)
|
||||||
store.log.error('Failed up toggle like', {err})
|
store.log.error('Failed up toggle like', {error: err})
|
||||||
}
|
}
|
||||||
}, [store, feedInfo])
|
}, [store, feedInfo])
|
||||||
|
|
||||||
|
@ -190,7 +190,7 @@ export const ProfileFeedScreenInner = observer(
|
||||||
if (feedInfo) {
|
if (feedInfo) {
|
||||||
feedInfo.togglePin().catch(e => {
|
feedInfo.togglePin().catch(e => {
|
||||||
Toast.show('There was an issue contacting the server')
|
Toast.show('There was an issue contacting the server')
|
||||||
store.log.error('Failed to toggle pinned feed', {e})
|
store.log.error('Failed to toggle pinned feed', {error: e})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}, [store, feedInfo])
|
}, [store, feedInfo])
|
||||||
|
|
|
@ -272,7 +272,7 @@ const Header = observer(function HeaderImpl({
|
||||||
Haptics.default()
|
Haptics.default()
|
||||||
list.togglePin().catch(e => {
|
list.togglePin().catch(e => {
|
||||||
Toast.show('There was an issue contacting the server')
|
Toast.show('There was an issue contacting the server')
|
||||||
store.log.error('Failed to toggle pinned list', {e})
|
store.log.error('Failed to toggle pinned list', {error: e})
|
||||||
})
|
})
|
||||||
}, [store, list])
|
}, [store, list])
|
||||||
|
|
||||||
|
|
|
@ -166,14 +166,14 @@ const ListItem = observer(function ListItemImpl({
|
||||||
Haptics.default()
|
Haptics.default()
|
||||||
item.togglePin().catch(e => {
|
item.togglePin().catch(e => {
|
||||||
Toast.show('There was an issue contacting the server')
|
Toast.show('There was an issue contacting the server')
|
||||||
store.log.error('Failed to toggle pinned feed', {e})
|
store.log.error('Failed to toggle pinned feed', {error: e})
|
||||||
})
|
})
|
||||||
}, [item, store])
|
}, [item, store])
|
||||||
const onPressUp = useCallback(
|
const onPressUp = useCallback(
|
||||||
() =>
|
() =>
|
||||||
savedFeeds.movePinnedFeed(item, 'up').catch(e => {
|
savedFeeds.movePinnedFeed(item, 'up').catch(e => {
|
||||||
Toast.show('There was an issue contacting the server')
|
Toast.show('There was an issue contacting the server')
|
||||||
store.log.error('Failed to set pinned feed order', {e})
|
store.log.error('Failed to set pinned feed order', {error: e})
|
||||||
}),
|
}),
|
||||||
[store, savedFeeds, item],
|
[store, savedFeeds, item],
|
||||||
)
|
)
|
||||||
|
@ -181,7 +181,7 @@ const ListItem = observer(function ListItemImpl({
|
||||||
() =>
|
() =>
|
||||||
savedFeeds.movePinnedFeed(item, 'down').catch(e => {
|
savedFeeds.movePinnedFeed(item, 'down').catch(e => {
|
||||||
Toast.show('There was an issue contacting the server')
|
Toast.show('There was an issue contacting the server')
|
||||||
store.log.error('Failed to set pinned feed order', {e})
|
store.log.error('Failed to set pinned feed order', {error: e})
|
||||||
}),
|
}),
|
||||||
[store, savedFeeds, item],
|
[store, savedFeeds, item],
|
||||||
)
|
)
|
||||||
|
|
|
@ -112,7 +112,7 @@ export const SettingsScreen = withAuthRequired(
|
||||||
err => {
|
err => {
|
||||||
store.log.error(
|
store.log.error(
|
||||||
'Failed to reload from server after handle update',
|
'Failed to reload from server after handle update',
|
||||||
{err},
|
{error: err},
|
||||||
)
|
)
|
||||||
setIsSwitching(false)
|
setIsSwitching(false)
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue