From 9d74142bb668434febb26f7daaec6b5661cfc794 Mon Sep 17 00:00:00 2001 From: Chris Payne Date: Tue, 8 Jul 2025 21:36:17 -0400 Subject: [PATCH] Final Pax8 Change --- tools/pax8.ps1 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/pax8.ps1 b/tools/pax8.ps1 index e2ca075..930b7da 100644 --- a/tools/pax8.ps1 +++ b/tools/pax8.ps1 @@ -79,6 +79,10 @@ function Invoke-Pax8Provision { Write-Host "[PAX8] Company provisioned successfully: $($response.id)" } 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)" + } } } \ No newline at end of file