mirror of
https://github.com/snazy2000/SnipeitPS.git
synced 2025-12-15 10:45:48 +00:00
Revert "If api request to snipe fails, don't continue, just throw error"
This commit is contained in:
parent
26e67d2b29
commit
d2805b1ffd
1 changed files with 2 additions and 3 deletions
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue