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
Is your feature request related to a problem? Please describe.
Originally reported here #395
There is a case if you configure an iOS app with the following:
Authentication: cognito user pools
Datastore w/ syncing capability via API
A basic schema without @auth, for example, the one we have in our documentation:
type Post @model {
id: ID!
title: String!
status: PostStatus!
rating: Int
content: String
}
enum PostStatus {
DRAFT
PUBLISHED
}
Given that when calling Amplify.Auth.fetchAuthSession returns false, attempt to make a mutation via Amplify.DataStore.save(), data is saved locally but fails to be synchronized to the backend.
Describe the solution you'd like
At a high level, the customer would like to know if something failed in the sync engine process, and perhaps if the mutation can never make it to the backend, then the mutation should not be stored locally, and an error should be presented to the user. This can be implemented in a variety of ways, but we have not done the work to come up with a design. Potential approaches to explore:
callback
hub notification
event on the publisher
Additional context
We will need to make sure that the behavior on iOS is also consistent on Android and JS.
The text was updated successfully, but these errors were encountered:
At a high level, the customer would like to know if something failed in the sync engine process, and perhaps if the mutation can never make it to the backend
That expectation is correct and the DataStore configuration has an errorHandler that should be triggered in that scenario.
I tested a custom errorHandler and the errorHandler does get called, but the locally stored item doesn't seem to get sync'ed to the backend (even when you go back into an authenticated state and restart the sync engine). Looks like we'll need to dig into this.
I believe with the current state of DataStore, per #815 and #1299, the sync engine should not halt in case of authentication errors and retry the mutation.
Is your feature request related to a problem? Please describe.
Originally reported here #395
There is a case if you configure an iOS app with the following:
Given that when calling
Amplify.Auth.fetchAuthSession
returns false, attempt to make a mutation viaAmplify.DataStore.save()
, data is saved locally but fails to be synchronized to the backend.Describe the solution you'd like
At a high level, the customer would like to know if something failed in the sync engine process, and perhaps if the mutation can never make it to the backend, then the mutation should not be stored locally, and an error should be presented to the user. This can be implemented in a variety of ways, but we have not done the work to come up with a design. Potential approaches to explore:
Additional context
The text was updated successfully, but these errors were encountered: