mirror of
https://github.com/cheeaun/phanpy.git
synced 2024-11-24 18:25:41 +03:00
Silence errors for follow requests & announcements
This commit is contained in:
parent
78a6f13380
commit
68759e64d1
1 changed files with 16 additions and 6 deletions
|
@ -92,11 +92,16 @@ function Notifications({ columnMode }) {
|
||||||
return allNotifications;
|
return allNotifications;
|
||||||
}
|
}
|
||||||
|
|
||||||
function fetchFollowRequests() {
|
async function fetchFollowRequests() {
|
||||||
// Note: no pagination here yet because this better be on a separate page. Should be rare use-case???
|
// Note: no pagination here yet because this better be on a separate page. Should be rare use-case???
|
||||||
return masto.v1.followRequests.list({
|
try {
|
||||||
|
return await masto.v1.followRequests.list({
|
||||||
limit: 80,
|
limit: 80,
|
||||||
});
|
});
|
||||||
|
} catch (e) {
|
||||||
|
// Silently fail
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadFollowRequests = () => {
|
const loadFollowRequests = () => {
|
||||||
|
@ -112,8 +117,13 @@ function Notifications({ columnMode }) {
|
||||||
})();
|
})();
|
||||||
};
|
};
|
||||||
|
|
||||||
function fetchAnnouncements() {
|
async function fetchAnnouncements() {
|
||||||
return masto.v1.announcements.list();
|
try {
|
||||||
|
return await masto.v1.announcements.list();
|
||||||
|
} catch (e) {
|
||||||
|
// Silently fail
|
||||||
|
return [];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const loadNotifications = (firstLoad) => {
|
const loadNotifications = (firstLoad) => {
|
||||||
|
|
Loading…
Reference in a new issue