Check if token has been revoked and offer user to reauthenticate
Problem
When the user authenticates using OAuth and the token is revoked, the extension starts failing to load project data without a clear user message. The error is only logged
2023-12-14T20:42:23:653 [error]: Error performing token check
Unauthorized
Error: Unauthorized
at #n (/Users/tomas/.vscode-insiders/extensions/gitlab.gitlab-workflow-3.93.1/assets/language-server/node/main-bundle.js:117:1177)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PB.checkToken (/Users/tomas/.vscode-insiders/extensions/gitlab.gitlab-workflow-3.93.1/assets/language-server/node/main-bundle.js:117:1354)
at async JE.didChangeConfigurationHandler (/Users/tomas/.vscode-insiders/extensions/gitlab.gitlab-workflow-3.93.1/assets/language-server/node/main-bundle.js:123:1431)
2023-12-14T20:42:23:653 [warning]: Token is invalid. Failed to check token: Error: Unauthorized. Reason: unknown
Solution
detect revoked token and offer user to re-authenticate
Edited by Tomas Vik