Skip to content

Commit 3aebe7f

Browse files
authored
[server] Fix mis-reporting of errors as "success" (in addition) (#19750)
1 parent f60af53 commit 3aebe7f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

components/server/src/user/token-service.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,9 +125,10 @@ export class TokenService implements TokenProvider {
125125
// Perform actual refresh
126126
const stopTimer = scmTokenRefreshLatencyHistogram.startTimer({ host });
127127
try {
128-
return await authProvider.refreshToken(user, requestedLifetimeDate);
129-
} finally {
128+
const result = await authProvider.refreshToken(user, requestedLifetimeDate);
130129
reportScmTokenRefreshRequest(host, opportunisticRefresh, "success");
130+
return result;
131+
} finally {
131132
stopTimer({ host });
132133
}
133134
},

0 commit comments

Comments
 (0)