From 8e95e381144dd7acb9b1a456523b624b4bccba0b Mon Sep 17 00:00:00 2001 From: Dachary Date: Tue, 13 Aug 2024 16:28:23 -0400 Subject: [PATCH] (DOCSP-40225): Node.js Error Handler: Typo Fix (#3367) ## Pull Request Info - SDK Docs Consolidation Jira ticket: https://jira.mongodb.org/browse/DOCSP-40225 ### Staging Links - [Handle Sync Errors - Node.js](https://deploy-preview-3367--device-sdk.netlify.app/sdk/node/sync/handle-sync-errors/#discard-unsynced-changes-after-breaking-schema-changes) ### Release Notes - Node.js SDK - Sync Data/Handle Sync Errors: Correct a parameter in the error handler code from `error` to `onError`. --- examples/node/legacy/Examples/client-reset.js | 2 +- ...discard-unsynced-changes-after-destructive-schema-changes.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/node/legacy/Examples/client-reset.js b/examples/node/legacy/Examples/client-reset.js index bd5263f64c..885fc1a47d 100644 --- a/examples/node/legacy/Examples/client-reset.js +++ b/examples/node/legacy/Examples/client-reset.js @@ -267,7 +267,7 @@ describe.skip("Client Reset with Seamless Loss", () => { // :remove-end: }, }, - error: handleSyncError, // invoked with destructive schema changes + onError: handleSyncError, // invoked with destructive schema changes }, }; // :snippet-end: diff --git a/source/examples/generated/node/client-reset.snippet.discard-unsynced-changes-after-destructive-schema-changes.js b/source/examples/generated/node/client-reset.snippet.discard-unsynced-changes-after-destructive-schema-changes.js index f65ea3e57f..e3f78da803 100644 --- a/source/examples/generated/node/client-reset.snippet.discard-unsynced-changes-after-destructive-schema-changes.js +++ b/source/examples/generated/node/client-reset.snippet.discard-unsynced-changes-after-destructive-schema-changes.js @@ -40,6 +40,6 @@ const config = { console.log("New realm path", afterRealm.path); }, }, - error: handleSyncError, // invoked with destructive schema changes + onError: handleSyncError, // invoked with destructive schema changes }, };