diff --git a/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 b/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 index 02817e2..8400267 100644 --- a/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 +++ b/SnipeitPS/Private/Invoke-SnipeitMethod.ps1 @@ -72,9 +72,8 @@ $webResponse = Invoke-WebRequest @splatParameters } catch { - #Write-Verbose "[$($MyInvocation.MyCommand.Name)] Failed to get an answer from the server" - #$webResponse = $_.Exception.Response - throw "[$($MyInvocation.MyCommand.Name)] Failed to get an answer from the server. $($_.Exception.Response)" + Write-Verbose "[$($MyInvocation.MyCommand.Name)] Failed to get an answer from the server" + $webResponse = $_.Exception.Response } Write-Debug "[$($MyInvocation.MyCommand.Name)] Executed WebRequest. Access $webResponse to see details"