fix uncaught errors

This commit is contained in:
pa
2025-07-14 21:25:58 +09:00
committed by Natsumi
parent ee37517b2d
commit f53eed46cd
2 changed files with 56 additions and 11 deletions

View File

@@ -258,6 +258,9 @@ export const useGalleryStore = defineStore('Gallery', () => {
vrcPlusIconRequest vrcPlusIconRequest
.getFileList(params) .getFileList(params)
.then((args) => handleFilesList(args)) .then((args) => handleFilesList(args))
.catch((error) => {
console.error('Error fetching gallery files:', error);
})
.finally(() => { .finally(() => {
state.galleryDialogGalleryLoading = false; state.galleryDialogGalleryLoading = false;
}); });
@@ -272,6 +275,9 @@ export const useGalleryStore = defineStore('Gallery', () => {
vrcPlusIconRequest vrcPlusIconRequest
.getFileList(params) .getFileList(params)
.then((args) => handleFilesList(args)) .then((args) => handleFilesList(args))
.catch((error) => {
console.error('Error fetching VRC Plus icons:', error);
})
.finally(() => { .finally(() => {
state.galleryDialogIconsLoading = false; state.galleryDialogIconsLoading = false;
}); });
@@ -323,6 +329,9 @@ export const useGalleryStore = defineStore('Gallery', () => {
vrcPlusIconRequest vrcPlusIconRequest
.getFileList(params) .getFileList(params)
.then((args) => handleFilesList(args)) .then((args) => handleFilesList(args))
.catch((error) => {
console.error('Error fetching stickers:', error);
})
.finally(() => { .finally(() => {
state.galleryDialogStickersLoading = false; state.galleryDialogStickersLoading = false;
}); });
@@ -466,6 +475,9 @@ export const useGalleryStore = defineStore('Gallery', () => {
vrcPlusIconRequest vrcPlusIconRequest
.getFileList(params) .getFileList(params)
.then((args) => handleFilesList(args)) .then((args) => handleFilesList(args))
.catch((error) => {
console.error('Error fetching emojis:', error);
})
.finally(() => { .finally(() => {
state.galleryDialogEmojisLoading = false; state.galleryDialogEmojisLoading = false;
}); });

View File

@@ -230,18 +230,36 @@ export const useInstanceStore = defineStore('Instance', () => {
); );
state.currentInstanceWorld.focusViewDisabled = state.currentInstanceWorld.focusViewDisabled =
args.ref?.tags.includes('feature_focus_view_disabled'); args.ref?.tags.includes('feature_focus_view_disabled');
checkVRChatCache(args.ref).then((cacheInfo) => { checkVRChatCache(args.ref)
if (cacheInfo.Item1 > 0) { .then((cacheInfo) => {
state.currentInstanceWorld.inCache = true; if (cacheInfo.Item1 > 0) {
state.currentInstanceWorld.cacheSize = `${( state.currentInstanceWorld.inCache = true;
cacheInfo.Item1 / 1048576 state.currentInstanceWorld.cacheSize = `${(
).toFixed(2)} MB`; cacheInfo.Item1 / 1048576
} ).toFixed(2)} MB`;
}); }
getBundleDateSize(args.ref).then((bundleSizes) => { })
state.currentInstanceWorld.bundleSizes = bundleSizes; .catch((error) => {
}); console.error(
'Error checking VRChat cache:',
error
);
});
getBundleDateSize(args.ref)
.then((bundleSizes) => {
state.currentInstanceWorld.bundleSizes =
bundleSizes;
})
.catch((error) => {
console.error(
'Error fetching bundle sizes:',
error
);
});
return args; return args;
})
.catch((error) => {
console.error('Error fetching world data:', error);
}); });
} else { } else {
worldRequest worldRequest
@@ -280,6 +298,12 @@ export const useInstanceStore = defineStore('Instance', () => {
}) })
.then((args) => { .then((args) => {
state.currentInstanceWorld.instance = args.ref; state.currentInstanceWorld.instance = args.ref;
})
.catch((error) => {
console.error(
'Error fetching instance data:',
error
);
}); });
} }
} }
@@ -632,6 +656,9 @@ export const useInstanceStore = defineStore('Instance', () => {
.then((args) => { .then((args) => {
Vue.set(L, 'user', args.ref); Vue.set(L, 'user', args.ref);
return args; return args;
})
.catch((error) => {
console.error('Error fetching user:', error);
}); });
} else { } else {
L.user = ref; L.user = ref;
@@ -917,6 +944,12 @@ export const useInstanceStore = defineStore('Instance', () => {
args.json?.queueSize args.json?.queueSize
); );
} }
})
.catch((error) => {
console.error(
'Error fetching instance data for queue:',
error
);
}); });
} }
instanceQueueUpdate(instanceId, 0, 0); instanceQueueUpdate(instanceId, 0, 0);