fix(web): Handle upload failures from public users (#24826)

This commit is contained in:
juliancarrivick
2026-01-13 15:15:54 +00:00
committed by GitHub
parent cc90c912f5
commit 6e86697996
2 changed files with 77 additions and 2 deletions
+4 -2
View File
@@ -125,6 +125,7 @@ async function fileUploader({
}: FileUploaderParams): Promise<string | undefined> {
const fileCreatedAt = new Date(assetFile.lastModified).toISOString();
const $t = get(t);
const wasInitiallyLoggedIn = !!get(user);
uploadAssetsStore.markStarted(deviceAssetId);
@@ -215,8 +216,9 @@ async function fileUploader({
return responseData.id;
} catch (error) {
// ignore errors if the user logs out during uploads
if (!get(user)) {
// If the user store no longer holds a user, it means they have logged out
// In this case don't bother reporting any errors.
if (wasInitiallyLoggedIn && !get(user)) {
return;
}