-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DataStore does not expose errors on initial sync #7752
Comments
Have you considered using the |
The |
Ah interesting! I'd expect those errors to bubble up there. We can look into this 👍 |
Hey team! Would it also be possible to add an event when a local migration is about to happen? That would be really super helpful in terms of migrating data especially for mobile apps. I realize that the challenge here is we have to be aware of the last version the app was running, but at least we could create a local backup of the current data as json and re-sync manually for the time being. Users working offline then the app updating in the background is a pretty common scenario. Btw, appreciate the quick and thorough feedback on issues, it is really a great experience to work with the framework like this. Rob |
Hey @rraczae 👋 Would you be able to open up a new feature request for this? That will help our team better understand prioritization for any future improvements. |
I ran into the same issue. It took me quite a while to realise what was wrong. Basically I had data in wrong format in my Dynamo DB and I never received the initial sync READY event. I have configured an error handler, but it didn't receive any errors. |
This should be fixed by #9861. Please comment if you are still experiencing the issue. |
Is your feature request related to a problem? Please describe.
When the DataStore does it's initial sync and there is an error on converting the data into Models there are silent errors raised. If you enable Amplify.Logger.LOG_LEVEL = 'DEBUG', you can see them on the console. Unfortunately there is no way to programmatically receive these errors and handle things gracefully.
Describe the solution you'd like
It would be great to have a listener function that could receive these errors so we could:
Describe alternatives you've considered
The only option is to ensure the data model has no errors, which is ideal but then again we don't plan bad data. If we get bad data, it's a hard stop for the application as the DataStore does not fire the "ready" event.
Additional context
To reproduce:
If you watch the network tab you will see the graphql query for the object failing because thisIsRequired cannot be null.
The text was updated successfully, but these errors were encountered: