Skip to content

[BUG]: syncOfflineQueue silently skips ALL sessions when user is not authenticated — queued data orphaned forever#994

Open
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/939-syncofflinequeue-auth-check
Open

[BUG]: syncOfflineQueue silently skips ALL sessions when user is not authenticated — queued data orphaned forever#994
vipul674 wants to merge 1 commit into
Somil450:mainfrom
vipul674:fix/939-syncofflinequeue-auth-check

Conversation

@vipul674

Copy link
Copy Markdown

Description

When currentUserId is undefined (user not logged in), syncOfflineQueue silently skips every session via continue and returns {synced: 0, failed: 0}. Queued offline data is orphaned without any error indication.

Fix

Early-exit with throw new Error("User not authenticated — cannot sync offline queue") when user is not authenticated, so callers can surface the error to the user.

Changes

  • src/services/syncQueue.ts: Added auth guard before processing queue

Closes #939

Previously skipped all sessions silently when user not authenticated,
orphaning queued data. Now throws early with clear error message.

Closes Somil450#939
@vercel

vercel Bot commented Jun 27, 2026

Copy link
Copy Markdown

@vipul674 is attempting to deploy a commit to the somiljain2024-4175's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vipul674

Copy link
Copy Markdown
Author

@Somil450 Please review this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: syncOfflineQueue silently skips ALL sessions when user is not authenticated — queued data orphaned forever

1 participant