Something went wrong while fetching comments. Please try again.
Created by: mollylogue
Context:
last_error
field and calls syncer.SyncRepo()
for each of these repos. That SyncRepo
function checks here if the error returned is a particular type of error or not. Currently none of the errors returned from Gitlab match that type, so this code updates that code to return the correct error.ProjectNotFoundError
rather than an HTTPError
) because it's what we do with Github and it seems way cleaner. If others are worried about making this change to the error being returned, there is the possibility of handling an http error returned by RepoStore.GetByName
in the syncer instead. I just personally prefer to keep consistency across different sources.Updated/added unit tests to reflect this behavior. Will also test once more in my local deployment before merging.
Closes https://github.com/sourcegraph/security-issues/issues/210