Skip to content

Include failing NuGet source in workload advertising manifest update errors#55081

Draft
Copilot wants to merge 3 commits into
mainfrom
copilot/provide-feed-details-unauthorized-error
Draft

Include failing NuGet source in workload advertising manifest update errors#55081
Copilot wants to merge 3 commits into
mainfrom
copilot/provide-feed-details-unauthorized-error

Conversation

Copilot AI commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Workload advertising manifest updates on secured/inaccessible feeds surfaced repeated 401 Unauthorized failures without identifying which feed failed, making diagnosis difficult. This change propagates source context into the surfaced error so users can immediately identify the problematic feed.

  • Error propagation: include source on protocol failures

    • Updated NuGetPackageDownloader.GetPackageMetadataAsync(...) to wrap non-ignored FatalProtocolException with NuGetPackageInstallerException that includes the failing source URL and original protocol message.
    • This improves workload advertising-manifest failure output because WorkloadManifestUpdater already reports the thrown exception message.
  • Targeted coverage for source-aware failures

    • Added GivenAFailedSourceItShouldIncludeSourceInError in NuGetPackageInstallerTests.
    • Validates the wrapped exception message includes source context, preserves FatalProtocolException as InnerException, and carries through the inner message.
catch (FatalProtocolException e)
{
    throw new NuGetPackageInstallerException(
        $"{string.Format(CliStrings.FailedToLoadNuGetSource, source.Source)}: {e.Message}", e);
}

Copilot AI and others added 2 commits June 30, 2026 20:53
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Co-authored-by: marcpopMSFT <12663534+marcpopMSFT@users.noreply.github.com>
Copilot AI changed the title [WIP] Add feed details to unauthorized error messages Include failing NuGet source in workload advertising manifest update errors Jun 30, 2026
Copilot AI requested a review from marcpopMSFT June 30, 2026 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide feed details when erroring on unauthorized feed

2 participants