Skip to content

Commit 7ce8212

Browse files
committed
Update Set-SherwebSubscription.ps1
1 parent b3fee16 commit 7ce8212

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/CippExtensions/Public/Sherweb/Set-SherwebSubscription.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function Set-SherwebSubscription {
3535
}
3636
$OrderUri = "https://api.sherweb.com/service-provider/v1/orders?customerId=$CustomerId"
3737
$Order = Invoke-RestMethod -Uri $OrderUri -Method POST -Headers $AuthHeader -Body $OrderBody -ContentType 'application/json'
38-
if ($Order -match 'Internal Server Error') {
38+
if ($Order -match 'Internal Server Error' -and $Add -gt 0) {
3939
throw 'An error occurred while attempting to create a new subscription. Please check the Cumulus portal to ensure this customer has been provisioned for Microsoft 365.'
4040
}
4141
return $Order

0 commit comments

Comments
 (0)