fix: Exception in dry-run with Gandi Provider

This commit is contained in:
Maël Gangloff
2024-08-06 11:58:41 +02:00
parent a603a2c7a0
commit 21298b07a2
4 changed files with 16 additions and 14 deletions

View File

@@ -82,7 +82,8 @@ readonly class GandiConnector implements ConnectorInterface
$res = $this->client->request('POST', '/domain/domains', $httpOptions->toArray());
if (Response::HTTP_ACCEPTED !== $res->getStatusCode()) {
if ((!$dryRun && Response::HTTP_ACCEPTED !== $res->getStatusCode())
|| ($dryRun && Response::HTTP_OK !== $res->getStatusCode())) {
throw new \Exception($res->toArray()['message']);
}
}