Skip to content

Commit

Permalink
[preview] Add extra message for 401 when pat token is not full access. (
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh authored May 21, 2024
2 parents 7ff0424 + ac264a8 commit 929870b
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,15 @@ private TfsTeamProjectCollection GetDependantTfsCollection(NetworkCredential cre
new Dictionary<string, double> {
{ "Time",timer.ElapsedMilliseconds }
});
Log.Error(ex, "Unable to configure store: Check persmissions and credentials for {AuthenticationMode}", _config.AuthenticationMode);
Log.Error(ex, "Unable to configure store: Check persmissions and credentials for {AuthenticationMode}!", _config.AuthenticationMode);
switch (_config.AuthenticationMode)
{
case AuthenticationMode.AccessToken:
Log.Error("The PAT MUST be 'full access' for it to work with the Object Model API.");
break;
default:
break;
}
Environment.Exit(-1);
}
return y;
Expand Down

0 comments on commit 929870b

Please sign in to comment.