internal/repos: Return early if ProjectRepos returns an error
Created by: indradhanush
It appears we're writing a nil repos into the channel even when there's an error. Instead we should return early after writing the error into the channel.
Related to investigation of #40153.
Test plan
Existing tests should pass.