Skip to content

Commit 4642ea1

Browse files
Fixup error messages
1 parent f29ccdb commit 4642ea1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/code/ContainerRegistryServerAPICalls.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -516,8 +516,6 @@ internal bool IsContainerRegistryUnauthenticated(string containerRegistyUrl, boo
516516
}
517517

518518
anonymousAccessToken = results["access_token"].ToString();
519-
520-
_cmdletPassedIn.WriteDebug("Anonymous access token retrieved");
521519
return true;
522520
}
523521
}
@@ -770,7 +768,7 @@ internal Hashtable GetContainerRegistryMetadata(string packageName, string exact
770768
if (!NuGetVersion.TryParse(pkgVersionString, out NuGetVersion pkgVersion))
771769
{
772770
errRecord = new ErrorRecord(
773-
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version."),
771+
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version for package '{packageName}'."),
774772
"ParseMetadataFailure",
775773
ErrorCategory.InvalidArgument,
776774
this);
@@ -1775,7 +1773,7 @@ private Hashtable[] FindPackagesWithVersionHelper(string packageName, VersionTyp
17751773
if (!NuGetVersion.TryParse(pkgVersionString, out NuGetVersion pkgVersion))
17761774
{
17771775
errRecord = new ErrorRecord(
1778-
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version."),
1776+
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version for package '{packageName}'."),
17791777
"FindNameFailure",
17801778
ErrorCategory.InvalidArgument,
17811779
this);

0 commit comments

Comments
 (0)