mirror of
https://github.com/MrUnknownDE/VRCX.git
synced 2026-04-17 22:03:50 +02:00
Gracefully handle mutuals 403 error
This commit is contained in:
@@ -307,6 +307,9 @@ export function $throw(code, error, endpoint) {
|
||||
if (endpoint?.startsWith('analysis/')) {
|
||||
ignoreError = true;
|
||||
}
|
||||
if (endpoint.endsWith('/mutuals') && (code === 403 || code === -1)) {
|
||||
ignoreError = true;
|
||||
}
|
||||
if (text.length && !ignoreError) {
|
||||
if (AppDebug.errorNoty) {
|
||||
AppDebug.errorNoty.close();
|
||||
|
||||
@@ -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 =
|
||||
|
||||
Reference in New Issue
Block a user