From 8f14fec45bc2f65755f62342cbf3d928bc80519f Mon Sep 17 00:00:00 2001 From: Hazel K Date: Wed, 2 Oct 2024 00:09:10 -0400 Subject: [PATCH] fix error handling for following-feed --- packages/frontend/src/pages/following-feed.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/following-feed.vue b/packages/frontend/src/pages/following-feed.vue index e6dd816773..9218b18fda 100644 --- a/packages/frontend/src/pages/following-feed.vue +++ b/packages/frontend/src/pages/following-feed.vue @@ -89,7 +89,11 @@ async function selectUser(userId: string): Promise { .then(user => selectedUser.value = user) .catch(error => { console.error('Error fetching user info', error); - return selectedUserError.value = String(error); + + return selectedUserError.value = + typeof(error) === 'string' + ? String(error) + : JSON.stringify(error); }); } }