about summary refs log tree commit diff
path: root/src/state/models/content
diff options
context:
space:
mode:
Diffstat (limited to 'src/state/models/content')
-rw-r--r--src/state/models/content/feed-source.ts10
-rw-r--r--src/state/models/content/list.ts8
-rw-r--r--src/state/models/content/post-thread.ts2
-rw-r--r--src/state/models/content/profile.ts2
4 files changed, 12 insertions, 10 deletions
diff --git a/src/state/models/content/feed-source.ts b/src/state/models/content/feed-source.ts
index 8dac9b56f..d1b8fc9dc 100644
--- a/src/state/models/content/feed-source.ts
+++ b/src/state/models/content/feed-source.ts
@@ -134,7 +134,7 @@ export class FeedSourceModel {
     try {
       await this.rootStore.preferences.addSavedFeed(this.uri)
     } catch (error) {
-      this.rootStore.log.error('Failed to save feed', error)
+      this.rootStore.log.error('Failed to save feed', {error})
     } finally {
       track('CustomFeed:Save')
     }
@@ -147,7 +147,7 @@ export class FeedSourceModel {
     try {
       await this.rootStore.preferences.removeSavedFeed(this.uri)
     } catch (error) {
-      this.rootStore.log.error('Failed to unsave feed', error)
+      this.rootStore.log.error('Failed to unsave feed', {error})
     } finally {
       track('CustomFeed:Unsave')
     }
@@ -157,7 +157,7 @@ export class FeedSourceModel {
     try {
       await this.rootStore.preferences.addPinnedFeed(this.uri)
     } catch (error) {
-      this.rootStore.log.error('Failed to pin feed', error)
+      this.rootStore.log.error('Failed to pin feed', {error})
     } finally {
       track('CustomFeed:Pin', {
         name: this.displayName,
@@ -194,7 +194,7 @@ export class FeedSourceModel {
     } catch (e: any) {
       this.likeUri = undefined
       this.likeCount = (this.likeCount || 1) - 1
-      this.rootStore.log.error('Failed to like feed', e)
+      this.rootStore.log.error('Failed to like feed', {error: e})
     } finally {
       track('CustomFeed:Like')
     }
@@ -215,7 +215,7 @@ export class FeedSourceModel {
     } catch (e: any) {
       this.likeUri = uri
       this.likeCount = (this.likeCount || 0) + 1
-      this.rootStore.log.error('Failed to unlike feed', e)
+      this.rootStore.log.error('Failed to unlike feed', {error: e})
     } finally {
       track('CustomFeed:Unlike')
     }
diff --git a/src/state/models/content/list.ts b/src/state/models/content/list.ts
index 8fb9f4b5e..985d8d82d 100644
--- a/src/state/models/content/list.ts
+++ b/src/state/models/content/list.ts
@@ -339,7 +339,7 @@ export class ListModel {
     try {
       await this.rootStore.preferences.addPinnedFeed(this.uri)
     } catch (error) {
-      this.rootStore.log.error('Failed to pin feed', error)
+      this.rootStore.log.error('Failed to pin feed', {error})
     } finally {
       track('CustomFeed:Pin', {
         name: this.data?.name || '',
@@ -455,10 +455,12 @@ export class ListModel {
     this.error = cleanError(err)
     this.loadMoreError = cleanError(loadMoreErr)
     if (err) {
-      this.rootStore.log.error('Failed to fetch user items', err)
+      this.rootStore.log.error('Failed to fetch user items', {error: err})
     }
     if (loadMoreErr) {
-      this.rootStore.log.error('Failed to fetch user items', loadMoreErr)
+      this.rootStore.log.error('Failed to fetch user items', {
+        error: loadMoreErr,
+      })
     }
   }
 
diff --git a/src/state/models/content/post-thread.ts b/src/state/models/content/post-thread.ts
index a862c27d3..cf6377da7 100644
--- a/src/state/models/content/post-thread.ts
+++ b/src/state/models/content/post-thread.ts
@@ -163,7 +163,7 @@ export class PostThreadModel {
     this.hasLoaded = true
     this.error = cleanError(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
   }
diff --git a/src/state/models/content/profile.ts b/src/state/models/content/profile.ts
index 5333e7116..0050970e6 100644
--- a/src/state/models/content/profile.ts
+++ b/src/state/models/content/profile.ts
@@ -235,7 +235,7 @@ export class ProfileModel {
     this.hasLoaded = true
     this.error = cleanError(err)
     if (err) {
-      this.rootStore.log.error('Failed to fetch profile', err)
+      this.rootStore.log.error('Failed to fetch profile', {error: err})
     }
   }