Skip to content

Organization repositories page fails to display any repos if the code host returns an error

Created by: coury-clark

I was trying to navigate to the sourcegraph org repositories page and encountered an error:

CleanShot 2021-12-10 at 15 00 52@2x

Looking at the trace I found that the user that was trying to fetch repos from GitHub was rate limited:

"request to http://github-proxy/user/repos?sort=created&visibility=all&page=1&per_page=100 returned status 403: API rate limit exceeded for user ID 15893131."

This probably shouldn't block the entire list of repos from displaying if the org user is rate limited on GitHub. Additionally, the error message didn't really indicate what the actual problem was.

As a bonus note, this user that is attached to Sourcegraph is the same user we use for actions and other GitHub API commands. Given the high usage, we should split those out.