Final Pax8 Change

This commit is contained in:
Chris Payne
2025-07-08 21:36:17 -04:00
parent 3de7b437d9
commit 9d74142bb6

View File

@@ -79,6 +79,10 @@ function Invoke-Pax8Provision {
Write-Host "[PAX8] Company provisioned successfully: $($response.id)" Write-Host "[PAX8] Company provisioned successfully: $($response.id)"
} catch { } catch {
throw "[PAX8] Company creation failed: $($_.Exception.Message)" if ($_.Exception.Response -and $_.Exception.Response.StatusCode.Value__ -eq 422) {
Write-Host "[PAX8] A company with this information already exists."
} else {
throw "[PAX8] Company creation failed: $($_.Exception.Message)"
}
} }
} }