From 161464fc382aaee65b14dc73f5afdacc019201ba Mon Sep 17 00:00:00 2001 From: Jiri Formacek Date: Fri, 15 Nov 2024 13:22:22 +0100 Subject: [PATCH] updated warning on non-json response --- Commands/Public/Invoke-ExoCommand.ps1 | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Commands/Public/Invoke-ExoCommand.ps1 b/Commands/Public/Invoke-ExoCommand.ps1 index 65e6d5d..da2895c 100644 --- a/Commands/Public/Invoke-ExoCommand.ps1 +++ b/Commands/Public/Invoke-ExoCommand.ps1 @@ -179,7 +179,7 @@ This command creates connection for IPPS REST API, retrieves list of sensitivity } else { - Write-Warning "Received non-JSON response: $($response.content.Headers.ContentType.MediaType)" + Write-Warning "Received non-JSON response with http status $($response.StatusCode): $($response.content.Headers.ContentType.MediaType)" $responseData = $payload } } @@ -239,7 +239,6 @@ This command creates connection for IPPS REST API, retrieves list of sensitivity } if($null -ne $ex) { - Write-Verbose "Handling exception: StatusCode $($ex.StatusCode)`tExoErrorCode: $($ex.ExoErrorCode)`tExoErrorType: $($ex.ExoErrorType)" switch($ErrorActionPreference) { 'Stop' { throw $ex }