Skip to content

Show service-upgrade sync refusals as the server words them - #29

Closed
callumalpass wants to merge 1 commit into
mainfrom
fix/cutover-sync-messages
Closed

callumalpass wants to merge 1 commit into
mainfrom
fix/cutover-sync-messages

Conversation

@callumalpass

Copy link
Copy Markdown
Collaborator

Problem

When a collection is being upgraded, or has moved to the new mdbase service, the server answers sync with a plain-language message. Examples: collection_migrating, collection_unavailable, onboarding_moved. The plugin already reads that message, but syncProblem had no branch for these codes. They fell through to the internal-failure case, so the user saw:

Sync stopped unexpectedly: This collection is being upgraded… Try again in a few minutes. Your files are safe. If this keeps happening, copy diagnostics and report it.

Change

  • collection_migrating: title "This collection is being upgraded". The server message is shown as-is. It is treated like a connection wait: quiet retry backoff with the offline cap, status bar "Offline", and no error entry in sync history.
  • collection_unavailable, onboarding_moved, collection_not_yet_migrated, account_suspended: the server message is shown as-is under "mdbase has been updated" (or "Your mdbase account is suspended"), without the "report it" suffix. Sync still retries in the background, so it resumes by itself if the account is moved back.

Not in this PR: reading details.update_url for an Update button, and following the server's Retry-After.

Tests

  • npm test: 446 tests, 445 pass, 0 fail, 1 existing TODO. Includes a new case for these codes.
  • npm run lint: pass

collection_migrating, collection_unavailable, onboarding_moved and
account_suspended arrived with plain-language server copy, but fell
through to "Sync stopped unexpectedly" with a suffix asking users to
copy diagnostics and report a bug. Show the message as-is under a calm
title. collection_migrating is treated as a wait: quiet backoff with the
offline cap and no history error entry.
@callumalpass

Copy link
Copy Markdown
Collaborator Author

Superseded by #30.

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.

1 participant