Skip to content

repo-updater: Expose unauthorized error during sync

Administrator requested to merge report-bad-credentials-during-sync into main

Created by: ryanslade

During sync, if we encounter bad credentials we treat this as a special case where instead of bailing out we continue the sync as if zero repos were sourced. We don't want to treat it as a hard error since then we won't back off and the repos will continue to be associated with the external service.

However, we DO want to record that there was an issue during sync so this change returns an error back to our workerutil handler so that the error is at least recorded against the external service. This in turn allows us to surface the error to the user via the ExternalService.LastSyncError field in our API.

Also note that the error is returned after we've updated the NextSyncAt field so backoff will continue to work.

Merge request reports

Loading