Skip to content

Commit eca3507

Browse files
committed
fix: use specific 'token provided' match instead of broad 'token' in GitLab CLI error normalization
The previous check used lower.includes('token') which would match any error containing the word 'token' (e.g. 'unexpected token' in JSON parse errors), misclassifying them as authentication failures. Changed to 'token provided' to match actual glab authentication errors like 'no token provided' and 'invalid token provided', consistent with how the GitHub CLI error handler uses the specific 'no oauth token' phrase.
1 parent 5e6fd83 commit eca3507

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

apps/server/src/sourceControl/GitLabCli.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ function normalizeGitLabCliError(operation: "execute" | "stdout", error: unknown
101101
lower.includes("authentication failed") ||
102102
lower.includes("not logged in") ||
103103
lower.includes("glab auth login") ||
104-
lower.includes("token")
104+
lower.includes("token provided")
105105
) {
106106
return new GitLabCliError({
107107
operation,

0 commit comments

Comments
 (0)