Skip to content

Commit

Permalink
(DOCSP-27391): Add a link to App Services Sync Errors from SDKs (#2485)
Browse files Browse the repository at this point in the history
## 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)
  • Loading branch information
dacharyc committed Jan 11, 2023
1 parent 804c8ba commit 8e1f3da
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions source/includes/sync-errors-in-app-services.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.. tip::

For a list of common Device Sync errors and how to handle them, refer to
:ref:`sync-errors` in the App Services Device Sync documentation.
2 changes: 2 additions & 0 deletions source/sdk/dotnet/sync/handle-sync-errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ strongly typed handling logic.
`HelpLink <https://docs.microsoft.com/en-us/dotnet/api/system.exception.helplink?view=net-6.0#system-exception-helplink>`_
property on the exception contains a link to the associated log entry.

.. include:: /includes/sync-errors-in-app-services.rst

.. _dotnet-reset-a-client-realm-file:

.. Reset a Client Realm File
Expand Down
2 changes: 2 additions & 0 deletions source/sdk/flutter/sync/handle-sync-errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ If you do not specify a ``syncErrorHandler``, the default behavior is to print t
.. literalinclude:: /examples/generated/flutter/open_flexible_sync_realm_test.snippet.sync-error-handler.dart
:language: dart

.. include:: /includes/sync-errors-in-app-services.rst

.. _flutter-client-reset:

Client Reset
Expand Down
2 changes: 2 additions & 0 deletions source/sdk/java/examples/sync-changes-between-devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,8 @@ builder method:
:language: java
:copyable: false

.. include:: /includes/sync-errors-in-app-services.rst

.. _java-reset-a-client-realm-file:

Reset a Client Realm File
Expand Down
2 changes: 2 additions & 0 deletions source/sdk/kotlin/errors/app.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,8 @@ Sync errors occur when Device Sync fails.

`SyncException <{+kotlin-sync-prefix+}io.realm.kotlin.mongodb.exceptions/-sync-exception/index.html>`__

.. include:: /includes/sync-errors-in-app-services.rst

Unrecoverable Sync Errors
~~~~~~~~~~~~~~~~~~~~~~~~~

Expand Down
1 change: 1 addition & 0 deletions source/sdk/node/examples/sync-changes-between-devices.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,7 @@ Set an error handler by registering an error callback as part of the :js-sdk:`Sy
.. literalinclude:: /examples/generated/node/sync-changes-between-devices.snippet.sync-changes-between-devices-handle-sync-errors.js
:language: javascript

.. include:: /includes/sync-errors-in-app-services.rst

.. _node-perform-a-client-reset:

Expand Down
2 changes: 2 additions & 0 deletions source/sdk/react-native/sync-data/handle-sync-errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Set an error handler by registering an error callback as part of the :js-sdk:`Sy
.. literalinclude:: /examples/generated/node/sync-changes-between-devices.snippet.sync-changes-between-devices-handle-sync-errors.js
:language: javascript

.. include:: /includes/sync-errors-in-app-services.rst

.. note:: Client Reset Errors

To learn more about handling client reset errors, read the :ref:`Reset a Client Realm <react-native-client-resets>` documentation.
2 changes: 2 additions & 0 deletions source/sdk/swift/sync/handle-sync-errors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ While developing an application that uses Device Sync, you should set an error
handler. This error handler will detect and respond to any failed sync-related
API calls.

.. include:: /includes/sync-errors-in-app-services.rst

.. tabs-realm-languages::

.. tab::
Expand Down

0 comments on commit 8e1f3da

Please sign in to comment.