Skip to content

[DCR]: VS Credential Provider exception messages are not displayed by NuGet in Output/Error List window logs. #12068

@kartheekp-ms

Description

@kartheekp-ms

NuGet Product(s) Affected

Visual Studio Package Management UI

Current Behavior

While accessing private Azure DevOps feeds in Visual Studio, sometimes users may get 401 unauthorized errors because of state accounts, bad credentials etc., Visual Studio adds Unable to load service index from source: {source URL}. Response status code from the server didn't indicate success 401 (unauthorized). message to the Output -> Package Manager window and an entry to the Error List window. In few cases VS Credential Provider provides some additional information in the exception that may help customers to resolve the problem. Unfortunately, this information is not displayed to the user by NuGet.

Desired Behavior

Display VS Credential Provider additional information in the exception to the customer in Visual Studio so that the error message is more actionable. In few cases the action may resolve user error and helps customers to access their private feeds from the comfort of their VS IDE.

Additional Context

Repro steps

  1. Download the sample solution from authentication-demo.zip.
  2. Open the solution in Visual Studio.
  3. Navigate to the solution-level Package Manager UI.
  4. Visual Studio will attempt to access the private feed. During this process, a sign-in prompt will appear for the user to select an account.
  5. Choose a personal Microsoft account that does not have access to the feed.
  6. The Credential Provider will throw an exception as illustrated below: This exception was captured while debugging the NuGet Client extension.
    auth-demo-exception
  7. The exception thrown by the Credential Provider is not displayed in either the NuGet Output window or the Error List window in Visual Studio.
    auth-issue-output

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions