You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(DataStore): endless retry of mutation request when server responds with 401 error code (#3511) (#3512)
* fix(DataStore): endless retry of mutation request when server responds with 401 error code (#3511)
* fix(DataStore): endless retry of mutation request when server responds with 401 error code (#3511)
* fix(DataStore): endless retry of mutation request when server responds with 401 error code (#3511)
Co-authored-by: Michael Law <[email protected]>
---------
Co-authored-by: Michael Law <[email protected]>
Copy file name to clipboardExpand all lines: AmplifyPlugins/DataStore/Sources/AWSDataStorePlugin/Sync/MutationSync/OutgoingMutationQueue/SyncMutationToCloudOperation.swift
+1-1
Original file line number
Diff line number
Diff line change
@@ -321,7 +321,7 @@ class SyncMutationToCloudOperation: AsynchronousOperation {
321
321
322
322
/// - Warning: Must be invoked from a locking context
Copy file name to clipboardExpand all lines: AmplifyPlugins/DataStore/Tests/AWSDataStorePluginTests/Sync/MutationQueue/SyncMutationToCloudOperationTests.swift
+62
Original file line number
Diff line number
Diff line change
@@ -292,6 +292,68 @@ class SyncMutationToCloudOperationTests: XCTestCase {
292
292
XCTAssertTrue(advice.shouldRetry)
293
293
}
294
294
295
+
/// Given: Model with multiple auth types. Mutation requests always fail with 401 error code
296
+
/// When: Mutating model fails with 401
297
+
/// Then: DataStore will try again with each auth type and eventually fails
0 commit comments