Skip to content
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

Revert "fix(datastore): call errorHandler in Sync operation when failure" #3238

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,10 @@ final class InitialSyncOperation: AsynchronousOperation {
switch result {
case .failure(let apiError):
if self.isAuthSignedOutError(apiError: apiError) {
self.log.error("Sync for \(self.modelSchema.name) failed due to signed out error \(apiError.errorDescription)")
self.dataStoreConfiguration.errorHandler(DataStoreError.api(apiError))
}

// TODO: Retry query on error
let error = DataStoreError.api(apiError)
self.dataStoreConfiguration.errorHandler(error)
self.finish(result: .failure(error))
self.finish(result: .failure(DataStoreError.api(apiError)))
case .success(let graphQLResult):
self.handleQueryResults(lastSyncTime: lastSyncTime, graphQLResult: graphQLResult)
}
Expand Down
Loading