Skip to content

Commit 134f71e

Browse files
Fixup error messages
1 parent 23a13c0 commit 134f71e

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
@@ -512,8 +512,6 @@ internal bool IsContainerRegistryUnauthenticated(string containerRegistyUrl, boo
512512
}
513513

514514
anonymousAccessToken = results["access_token"].ToString();
515-
516-
_cmdletPassedIn.WriteDebug("Anonymous access token retrieved");
517515
return true;
518516
}
519517
}
@@ -766,7 +764,7 @@ internal Hashtable GetContainerRegistryMetadata(string packageName, string exact
766764
if (!NuGetVersion.TryParse(pkgVersionString, out NuGetVersion pkgVersion))
767765
{
768766
errRecord = new ErrorRecord(
769-
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version."),
767+
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version for package '{packageName}'."),
770768
"ParseMetadataFailure",
771769
ErrorCategory.InvalidArgument,
772770
this);
@@ -1771,7 +1769,7 @@ private Hashtable[] FindPackagesWithVersionHelper(string packageName, VersionTyp
17711769
if (!NuGetVersion.TryParse(pkgVersionString, out NuGetVersion pkgVersion))
17721770
{
17731771
errRecord = new ErrorRecord(
1774-
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version."),
1772+
new ArgumentException($"Version {pkgVersionString} to be parsed from metadata is not a valid NuGet version for package '{packageName}'."),
17751773
"FindNameFailure",
17761774
ErrorCategory.InvalidArgument,
17771775
this);

0 commit comments

Comments
 (0)