Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional SyncError types, explain what they are, when then can happen, and how to handle them #2481

Open
drmarkpowell opened this issue Jan 11, 2023 · 3 comments

Comments

@drmarkpowell
Copy link

Is there something wrong with existing docs content, or is something missing from the docs?

Missing

If this is related to existing docs content, what page or pages are affected?

https://www.mongodb.com/docs/realm/sdk/swift/sync/handle-sync-errors/

Which SDK does this issue affect?

Swift and maybe others

What would you like to see in the docs that isn't already there?

There is a detailed explanation here of Client Reset errors and how they may be dealt with, and that is very helpful, please maintain that.

Also though, there are other error types in this category:

  • clientSessionError
  • clientUserError
  • clientInternalError
  • underlyingAuthError
  • permissionDeniedError

These types of Sync Error have no documented details on the page I linked above, and it would be very helpful to add them.
For our products that use Realm, the expectations of the organization I work for are that any type of errors like these that can happen are fully understood and that any and all precautions taken to handle them gracefully (or at least reasonably) to get users back to a working app state as soon as possible and in as automated a way as possible.

If the content is technical, can you link to an example implementation?

Realm SDK docs for RLMSyncError

Where do you feel this content belongs?

Handling Realm Sync Errors

Perhaps add sub-pages under this heading to better organize the larger amount of content. Client reset for example is right now the bulk of the page and maybe needs its own page.

Other Comments

@dacharyc
Copy link
Collaborator

Thank you for the feedback, @drmarkpowell ! You're right, we should do a better job of exposing errors and their resolutions in the SDK documentation. I'll talk with the team about scoping a bigger-picture error handling project during our upcoming planning process. In the short term, I'll add a link from this page to the Sync Error documentation page in the App Services documentation where we have historically maintained information about error messages.

@drmarkpowell
Copy link
Author

drmarkpowell commented Jan 11, 2023 via email

@dacharyc
Copy link
Collaborator

I think it's true that there is summarization or consolidation going on - for example, I just put up a PR for a new page where I discovered we consolidate two different backend errors into one client error - but in looking around since your feedback here, I also see that our error documentation is out of date or incomplete in different places. I think that means we definitely need a larger project around this.

Meanwhile, I'll have a PR up shortly to link between the SDK docs and the App Services docs, so at least some of that information is available.

Again, thank you for raising this!

dacharyc added a commit that referenced this issue Jan 11, 2023
## Pull Request Info

This PR is a quick bandaid to expose more information about Sync errors
in the SDK docs in response to this issue:
#2481

We should follow up with a larger project to expand our Sync error
handling documentation across SDKs, and ensure consistency with API
documentation & documented error codes in Core.

### Jira

- https://jira.mongodb.org/browse/DOCSP-27391

### Staged Changes

- [Handle Sync Errors - Flutter
SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-27391/sdk/flutter/sync/handle-sync-errors/)
- [Sync Changes Between Devices - Java
SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-27391/sdk/java/examples/sync-changes-between-devices/#handle-sync-errors)
- [Handle App Errors - Kotlin
SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-27391/sdk/kotlin/errors/app/#sync-errors)
- [Handle Sync Errors - .NET
SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-27391/sdk/dotnet/sync/handle-sync-errors/)
- [Sync Changes Between Devices - Node.js
SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-27391/sdk/node/examples/sync-changes-between-devices/#handle-sync-errors)
- [Handle Sync Errors - React Native
SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-27391/sdk/react-native/sync-data/handle-sync-errors/)
- [Handle Sync Errors - Swift
SDK](https://docs-mongodbcom-staging.corp.mongodb.com/realm/docsworker-xlarge/DOCSP-27391/sdk/swift/sync/handle-sync-errors/)

### Reminder Checklist

If your PR modifies the docs, you might need to also update some
corresponding
pages. Check if completed or N/A.

- [x] Create Jira ticket for corresponding docs-app-services update(s),
if any
- [x] Checked/updated Admin API
- [x] Checked/updated CLI reference

### Review Guidelines


[REVIEWING.md](https://github.com/mongodb/docs-realm/blob/master/REVIEWING.md)
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

No branches or pull requests

2 participants