Skip to content
This repository was archived by the owner on Jul 15, 2023. It is now read-only.

Commit f0d43b3

Browse files
committed
vsts: correct HTTP status condition.
Fixes an obvisouly wrong condition.
1 parent 39467a6 commit f0d43b3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

VisualStudioTeamServices.Authentication/Src/Authority.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ public async Task<bool> ValidateToken(TargetUri targetUri, Token token)
371371
{
372372
// Even if the service responded, if the issue isn't a 400 class response then
373373
// the credentials were likely not rejected.
374-
if ((int)response.StatusCode < 400 && (int)response.StatusCode >= 500)
374+
if ((int)response.StatusCode < 400 || (int)response.StatusCode >= 500)
375375
{
376376
Trace.WriteLine($"unable to validate credentials for '{targetUri}', unexpected response [{(int)response.StatusCode} {response.ReasonPhrase}].");
377377

0 commit comments

Comments
 (0)