Fix other error logs while I'm at it

This commit is contained in:
Eric Bailey 2023-11-04 12:58:50 -05:00
parent df0dcf32f9
commit 7e29ebbadb
40 changed files with 104 additions and 86 deletions

View file

@ -401,7 +401,9 @@ export class NotificationsFeedModel {
this._setQueued(this._filterNotifications(queueModels))
this._countUnread()
} catch (e) {
this.rootStore.log.error('NotificationsModel:syncQueue failed', {e})
this.rootStore.log.error('NotificationsModel:syncQueue failed', {
error: e,
})
} finally {
this.lock.release()
}
@ -481,7 +483,9 @@ export class NotificationsFeedModel {
this.lastSync ? this.lastSync.toISOString() : undefined,
)
} 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.loadMoreError = cleanError(loadMoreError)
if (error) {
this.rootStore.log.error('Failed to fetch notifications', error)
this.rootStore.log.error('Failed to fetch notifications', {error})
}
if (loadMoreError) {
this.rootStore.log.error(
'Failed to load more notifications',
loadMoreError,
)
this.rootStore.log.error('Failed to load more notifications', {
error: loadMoreError,
})
}
}

View file

@ -51,7 +51,7 @@ export class PostsFeedItemModel {
this.richText = undefined
rootStore.log.warn(
'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

View file

@ -324,13 +324,12 @@ export class PostsFeedModel {
this.knownError = detectKnownError(this.feedType, error)
this.loadMoreError = cleanError(loadMoreError)
if (error) {
this.rootStore.log.error('Posts feed request failed', error)
this.rootStore.log.error('Posts feed request failed', {error})
}
if (loadMoreError) {
this.rootStore.log.error(
'Posts feed load-more request failed',
loadMoreError,
)
this.rootStore.log.error('Posts feed load-more request failed', {
error: loadMoreError,
})
}
}