Do not save last sync timestamp in DB if no data has been fetched from server
Closed this issue · 1 comments
pmartin commented
If no entry has been fetched from server when syncing (be it because of a network error, because of a wrong configuration, because of a server-side error, ...), we must not save the "last synced timestamp" in the local database.
This way, next time a sync is attempted, data will not be ignored as "more recent than last sync".
pmartin commented
Exceptions are now thrown if something goes wrong while syncing.
And the try/catch block includes the saving of the TS in database.
=> If something goes wrong, the TS will will not be saved in DB, which fixes this issue.