Skip to content

Recover from rejected GitHub sessions instead of reporting no internet - #639

Open
brynrichards-gds wants to merge 1 commit into
github:mainfrom
brynrichards-gds:fix/invalid-token-reauth
Open

brynrichards-gds wants to merge 1 commit into
github:mainfrom
brynrichards-gds:fix/invalid-token-reauth

Conversation

@brynrichards-gds

Copy link
Copy Markdown

This is a proposed fix for the "Unable to connect to the GitHub API, please check your internet connection", as reported in issues like #582 .

Currently the canReachGitHubAPI call treats every error the same way, including a 401 that indicates bad credentials.

In my case the logs in ~/.vscode-server/data/logs/ showed the following:

Activating GitHub Actions extension...
Error getting GitHub context
HttpError: Bad credentials - https://docs.github.com/rest
Cannot fetch github context (repeated)

The changes in this PR check for an authentication failure, displays a message saying "Your GitHub session is no longer valid. [Sign in again]" and allows the sign in to update the github context.

@brynrichards-gds
brynrichards-gds requested a review from a team as a code owner October 27, 2026 08:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant