One last?
This commit is contained in:
@@ -80,7 +80,7 @@ function Invoke-Pax8Provision {
|
|||||||
Write-Host "[PAX8] Company provisioned successfully: $($response.id)"
|
Write-Host "[PAX8] Company provisioned successfully: $($response.id)"
|
||||||
} catch {
|
} catch {
|
||||||
if ($_.Exception.Response -and $_.Exception.Response.StatusCode.Value__ -eq 422) {
|
if ($_.Exception.Response -and $_.Exception.Response.StatusCode.Value__ -eq 422) {
|
||||||
Write-Host "[PAX8] A company with this information already exists."
|
throw "[PAX8] A company with this information already exists."
|
||||||
} else {
|
} else {
|
||||||
throw "[PAX8] Company creation failed: $($_.Exception.Message)"
|
throw "[PAX8] Company creation failed: $($_.Exception.Message)"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user