Revert "If api request to snipe fails, don't continue, just throw error"

This commit is contained in:
Petri Asikainen 2021-05-17 08:39:16 +03:00 committed by GitHub
parent 26e67d2b29
commit d2805b1ffd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -72,9 +72,8 @@
$webResponse = Invoke-WebRequest @splatParameters $webResponse = Invoke-WebRequest @splatParameters
} }
catch { catch {
#Write-Verbose "[$($MyInvocation.MyCommand.Name)] Failed to get an answer from the server" Write-Verbose "[$($MyInvocation.MyCommand.Name)] Failed to get an answer from the server"
#$webResponse = $_.Exception.Response $webResponse = $_.Exception.Response
throw "[$($MyInvocation.MyCommand.Name)] Failed to get an answer from the server. $($_.Exception.Response)"
} }
Write-Debug "[$($MyInvocation.MyCommand.Name)] Executed WebRequest. Access $webResponse to see details" Write-Debug "[$($MyInvocation.MyCommand.Name)] Executed WebRequest. Access $webResponse to see details"