From 3d9eecf03ed5b944e9f907958adc398367fc3231 Mon Sep 17 00:00:00 2001 From: Ivan Artemiev <29709626+iartemiev@users.noreply.github.com> Date: Wed, 24 Mar 2021 14:10:17 -0400 Subject: [PATCH] fix(@aws-amplify/datastore): keep syncing when subs disabled --- 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; }