this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Silence errors for follow requests & announcements

+16 -6
+16 -6
src/pages/notifications.jsx
··· 92 92 return allNotifications; 93 93 } 94 94 95 - function fetchFollowRequests() { 95 + async function fetchFollowRequests() { 96 96 // Note: no pagination here yet because this better be on a separate page. Should be rare use-case??? 97 - return masto.v1.followRequests.list({ 98 - limit: 80, 99 - }); 97 + try { 98 + return await masto.v1.followRequests.list({ 99 + limit: 80, 100 + }); 101 + } catch (e) { 102 + // Silently fail 103 + return []; 104 + } 100 105 } 101 106 102 107 const loadFollowRequests = () => { ··· 112 117 })(); 113 118 }; 114 119 115 - function fetchAnnouncements() { 116 - return masto.v1.announcements.list(); 120 + async function fetchAnnouncements() { 121 + try { 122 + return await masto.v1.announcements.list(); 123 + } catch (e) { 124 + // Silently fail 125 + return []; 126 + } 117 127 } 118 128 119 129 const loadNotifications = (firstLoad) => {