From 3e23ecb6e6bf5b18e87e8a65abf44ba327095d82 Mon Sep 17 00:00:00 2001 From: Anam Navied Date: Fri, 6 Dec 2024 13:22:28 -0500 Subject: [PATCH] Bugfix for Install-PSResource Null pointer when package is present only in upstream feed in ADO (#1760) --- src/code/V3ServerAPICalls.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/code/V3ServerAPICalls.cs b/src/code/V3ServerAPICalls.cs index 8f5297ecc..c184426a8 100644 --- a/src/code/V3ServerAPICalls.cs +++ b/src/code/V3ServerAPICalls.cs @@ -1622,9 +1622,11 @@ private HttpContent HttpRequestCallForContent(string requestUrlV3, out ErrorReco "HttpRequestCallForContentFailure", ErrorCategory.InvalidResult, this); + + return null; } - if (string.IsNullOrEmpty(content.ToString())) + if (string.IsNullOrEmpty(content?.ToString())) { _cmdletPassedIn.WriteDebug("Response is empty"); }