Gracefully handle mutuals 403 error

This commit is contained in:
Natsumi
2025-12-04 13:57:14 +13:00
parent 3e7b12ab2b
commit aded54a263
2 changed files with 17 additions and 13 deletions

View File

@@ -964,19 +964,20 @@ export const useUserStore = defineStore('User', () => {
}
});
if (!currentUser.value.hasSharedConnectionsOptOut) {
userRequest
.getMutualCounts({ userId })
.then((args) => {
if (args.params.userId === D.id) {
D.mutualFriendCount =
args.json.friends;
D.mutualGroupCount =
args.json.groups;
}
})
.catch((error) => {
console.error(error);
});
try {
userRequest
.getMutualCounts({ userId })
.then((args) => {
if (args.params.userId === D.id) {
D.mutualFriendCount =
args.json.friends;
D.mutualGroupCount =
args.json.groups;
}
});
} catch (error) {
console.error(error);
}
}
} else {
D.previousDisplayNames =