fix(api): improve access token handling during credential refresh

This commit is contained in:
decolua
2026-03-10 16:38:32 +07:00
parent 31775393e6
commit a501c05969
2 changed files with 3 additions and 3 deletions
+2 -2
View File
@@ -33,8 +33,8 @@ async function refreshAndUpdateCredentials(connection) {
const refreshResult = await executor.refreshCredentials(credentials, console);
if (!refreshResult) {
// For GitHub, if refreshCredentials fails but we still have accessToken, try to use it directly
if (connection.provider === "github" && connection.accessToken) {
// Refresh failed but we still have an accessToken try with existing token
if (connection.accessToken) {
return { connection, refreshed: false };
}
throw new Error("Failed to refresh credentials. Please re-authorize the connection.");