about summary refs log tree commit diff
path: root/src/view/com
diff options
context:
space:
mode:
Diffstat (limited to 'src/view/com')
-rw-r--r--src/view/com/lists/ListItems.tsx4
-rw-r--r--src/view/com/lists/ListsList.tsx4
-rw-r--r--src/view/com/notifications/Feed.tsx8
-rw-r--r--src/view/com/post-thread/PostThread.tsx2
-rw-r--r--src/view/com/post-thread/PostThreadItem.tsx8
-rw-r--r--src/view/com/post/Post.tsx8
-rw-r--r--src/view/com/posts/Feed.tsx4
-rw-r--r--src/view/com/posts/FeedItem.tsx8
8 files changed, 25 insertions, 21 deletions
diff --git a/src/view/com/lists/ListItems.tsx b/src/view/com/lists/ListItems.tsx
index 855c07d14..76cd5e7c3 100644
--- a/src/view/com/lists/ListItems.tsx
+++ b/src/view/com/lists/ListItems.tsx
@@ -94,7 +94,7 @@ export const ListItems = observer(function ListItemsImpl({
     try {
       await list.refresh()
     } catch (err) {
-      list.rootStore.log.error('Failed to refresh lists', err)
+      list.rootStore.log.error('Failed to refresh lists', {error: err})
     }
     setIsRefreshing(false)
   }, [list, track, setIsRefreshing])
@@ -104,7 +104,7 @@ export const ListItems = observer(function ListItemsImpl({
     try {
       await list.loadMore()
     } catch (err) {
-      list.rootStore.log.error('Failed to load more lists', err)
+      list.rootStore.log.error('Failed to load more lists', {error: err})
     }
   }, [list, track])
 
diff --git a/src/view/com/lists/ListsList.tsx b/src/view/com/lists/ListsList.tsx
index efc874ef3..c0acaa96f 100644
--- a/src/view/com/lists/ListsList.tsx
+++ b/src/view/com/lists/ListsList.tsx
@@ -78,7 +78,7 @@ export const ListsList = observer(function ListsListImpl({
     try {
       await listsList.refresh()
     } catch (err) {
-      listsList.rootStore.log.error('Failed to refresh lists', err)
+      listsList.rootStore.log.error('Failed to refresh lists', {error: err})
     }
     setIsRefreshing(false)
   }, [listsList, track, setIsRefreshing])
@@ -88,7 +88,7 @@ export const ListsList = observer(function ListsListImpl({
     try {
       await listsList.loadMore()
     } catch (err) {
-      listsList.rootStore.log.error('Failed to load more lists', err)
+      listsList.rootStore.log.error('Failed to load more lists', {error: err})
     }
   }, [listsList, track])
 
diff --git a/src/view/com/notifications/Feed.tsx b/src/view/com/notifications/Feed.tsx
index 4ca22282d..ef16f598c 100644
--- a/src/view/com/notifications/Feed.tsx
+++ b/src/view/com/notifications/Feed.tsx
@@ -61,7 +61,9 @@ export const Feed = observer(function Feed({
       setIsPTRing(true)
       await view.refresh()
     } catch (err) {
-      view.rootStore.log.error('Failed to refresh notifications feed', err)
+      view.rootStore.log.error('Failed to refresh notifications feed', {
+        error: err,
+      })
     } finally {
       setIsPTRing(false)
     }
@@ -71,7 +73,9 @@ export const Feed = observer(function Feed({
     try {
       await view.loadMore()
     } catch (err) {
-      view.rootStore.log.error('Failed to load more notifications', err)
+      view.rootStore.log.error('Failed to load more notifications', {
+        error: err,
+      })
     }
   }, [view])
 
diff --git a/src/view/com/post-thread/PostThread.tsx b/src/view/com/post-thread/PostThread.tsx
index 378ef5028..b0728a8a6 100644
--- a/src/view/com/post-thread/PostThread.tsx
+++ b/src/view/com/post-thread/PostThread.tsx
@@ -119,7 +119,7 @@ export const PostThread = observer(function PostThread({
     try {
       view?.refresh()
     } catch (err) {
-      view.rootStore.log.error('Failed to refresh posts thread', err)
+      view.rootStore.log.error('Failed to refresh posts thread', {error: err})
     }
     setIsRefreshing(false)
   }, [view, setIsRefreshing])
diff --git a/src/view/com/post-thread/PostThreadItem.tsx b/src/view/com/post-thread/PostThreadItem.tsx
index 8976a7e2c..430269165 100644
--- a/src/view/com/post-thread/PostThreadItem.tsx
+++ b/src/view/com/post-thread/PostThreadItem.tsx
@@ -111,13 +111,13 @@ export const PostThreadItem = observer(function PostThreadItem({
   const onPressToggleRepost = React.useCallback(() => {
     return item
       .toggleRepost()
-      .catch(e => store.log.error('Failed to toggle repost', e))
+      .catch(e => store.log.error('Failed to toggle repost', {error: e}))
   }, [item, store])
 
   const onPressToggleLike = React.useCallback(() => {
     return item
       .toggleLike()
-      .catch(e => store.log.error('Failed to toggle like', e))
+      .catch(e => store.log.error('Failed to toggle like', {error: e}))
   }, [item, store])
 
   const onCopyPostText = React.useCallback(() => {
@@ -138,7 +138,7 @@ export const PostThreadItem = observer(function PostThreadItem({
         Toast.show('You will now receive notifications for this thread')
       }
     } catch (e) {
-      store.log.error('Failed to toggle thread mute', e)
+      store.log.error('Failed to toggle thread mute', {error: e})
     }
   }, [item, store])
 
@@ -149,7 +149,7 @@ export const PostThreadItem = observer(function PostThreadItem({
         Toast.show('Post deleted')
       },
       e => {
-        store.log.error('Failed to delete post', e)
+        store.log.error('Failed to delete post', {error: e})
         Toast.show('Failed to delete post, please try again')
       },
     )
diff --git a/src/view/com/post/Post.tsx b/src/view/com/post/Post.tsx
index e3c948e5d..8f862f321 100644
--- a/src/view/com/post/Post.tsx
+++ b/src/view/com/post/Post.tsx
@@ -142,13 +142,13 @@ const PostLoaded = observer(function PostLoadedImpl({
   const onPressToggleRepost = React.useCallback(() => {
     return item
       .toggleRepost()
-      .catch(e => store.log.error('Failed to toggle repost', e))
+      .catch(e => store.log.error('Failed to toggle repost', {error: e}))
   }, [item, store])
 
   const onPressToggleLike = React.useCallback(() => {
     return item
       .toggleLike()
-      .catch(e => store.log.error('Failed to toggle like', e))
+      .catch(e => store.log.error('Failed to toggle like', {error: e}))
   }, [item, store])
 
   const onCopyPostText = React.useCallback(() => {
@@ -169,7 +169,7 @@ const PostLoaded = observer(function PostLoadedImpl({
         Toast.show('You will now receive notifications for this thread')
       }
     } catch (e) {
-      store.log.error('Failed to toggle thread mute', e)
+      store.log.error('Failed to toggle thread mute', {error: e})
     }
   }, [item, store])
 
@@ -180,7 +180,7 @@ const PostLoaded = observer(function PostLoadedImpl({
         Toast.show('Post deleted')
       },
       e => {
-        store.log.error('Failed to delete post', e)
+        store.log.error('Failed to delete post', {error: e})
         Toast.show('Failed to delete post, please try again')
       },
     )
diff --git a/src/view/com/posts/Feed.tsx b/src/view/com/posts/Feed.tsx
index 0578036d9..7d54fd842 100644
--- a/src/view/com/posts/Feed.tsx
+++ b/src/view/com/posts/Feed.tsx
@@ -92,7 +92,7 @@ export const Feed = observer(function Feed({
     try {
       await feed.refresh()
     } catch (err) {
-      feed.rootStore.log.error('Failed to refresh posts feed', err)
+      feed.rootStore.log.error('Failed to refresh posts feed', {error: err})
     }
     setIsRefreshing(false)
   }, [feed, track, setIsRefreshing])
@@ -104,7 +104,7 @@ export const Feed = observer(function Feed({
     try {
       await feed.loadMore()
     } catch (err) {
-      feed.rootStore.log.error('Failed to load more posts', err)
+      feed.rootStore.log.error('Failed to load more posts', {error: err})
     }
   }, [feed, track])
 
diff --git a/src/view/com/posts/FeedItem.tsx b/src/view/com/posts/FeedItem.tsx
index 441621638..4d49eba6c 100644
--- a/src/view/com/posts/FeedItem.tsx
+++ b/src/view/com/posts/FeedItem.tsx
@@ -94,14 +94,14 @@ export const FeedItem = observer(function FeedItemImpl({
     track('FeedItem:PostRepost')
     return item
       .toggleRepost()
-      .catch(e => store.log.error('Failed to toggle repost', e))
+      .catch(e => store.log.error('Failed to toggle repost', {error: e}))
   }, [track, item, store])
 
   const onPressToggleLike = React.useCallback(() => {
     track('FeedItem:PostLike')
     return item
       .toggleLike()
-      .catch(e => store.log.error('Failed to toggle like', e))
+      .catch(e => store.log.error('Failed to toggle like', {error: e}))
   }, [track, item, store])
 
   const onCopyPostText = React.useCallback(() => {
@@ -123,7 +123,7 @@ export const FeedItem = observer(function FeedItemImpl({
         Toast.show('You will now receive notifications for this thread')
       }
     } catch (e) {
-      store.log.error('Failed to toggle thread mute', e)
+      store.log.error('Failed to toggle thread mute', {error: e})
     }
   }, [track, item, store])
 
@@ -135,7 +135,7 @@ export const FeedItem = observer(function FeedItemImpl({
         Toast.show('Post deleted')
       },
       e => {
-        store.log.error('Failed to delete post', e)
+        store.log.error('Failed to delete post', {error: e})
         Toast.show('Failed to delete post, please try again')
       },
     )