From bc940a54270ee823c5307120b28fbc76d68f83e6 Mon Sep 17 00:00:00 2001 From: "Chidozie Ononiwu (His Righteousness)" <31145988+chidozieononiwu@users.noreply.github.com> Date: Tue, 16 Nov 2021 16:36:39 -0800 Subject: [PATCH] Add better logging to GetExistingPackageVersions (#25351) --- eng/scripts/Language-Settings.ps1 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 36a6974935af5..ffe9ccdc91df2 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -254,7 +254,10 @@ function GetExistingPackageVersions ($PackageName, $GroupId=$null) return $existingVersion.versions } catch { - LogError "Failed to retrieve package versions. `n$_" + if ($_.Exception.Response.StatusCode -ne 404) + { + LogError "Failed to retrieve package versions for ${PackageName}. $($_.Exception.Message)" + } return $null } }