From 0e8968f9125b1b5f76389abe3d77986c1f65e32f Mon Sep 17 00:00:00 2001 From: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com> Date: Wed, 24 Mar 2021 15:04:33 -0400 Subject: [PATCH] fix(@aws-amplify/datastore): keep syncing when subs disabled (#7987) --- packages/datastore/src/sync/processors/subscription.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/datastore/src/sync/processors/subscription.ts b/packages/datastore/src/sync/processors/subscription.ts index 6702277303a..e01b5a29be5 100644 --- a/packages/datastore/src/sync/processors/subscription.ts +++ b/packages/datastore/src/sync/processors/subscription.ts @@ -396,7 +396,10 @@ class SubscriptionProcessor { subscriptionReadyCallback(); } - if (message.includes('"errorType":"Unauthorized"')) { + if ( + message.includes('"errorType":"Unauthorized"') || + message.includes('"errorType":"OperationDisabled"') + ) { return; }