chore: error message with contact roid

This commit is contained in:
Maël Gangloff 2025-02-25 22:47:33 +01:00
parent e6a1a275b6
commit eabf43ae12
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629

View File

@ -51,8 +51,10 @@ class EppClientProvider extends AbstractProvider implements CheckDomainProviderI
/** @var eppCheckContactResponse $resp */
$resp = $this->eppClient->request(new eppCheckContactRequest($contacts));
if (in_array(true, $resp->getCheckedContacts())) {
throw new BadRequestHttpException('At least one of the contacts entered cannot be used because they are indicated as available.');
foreach ($resp->getCheckedContacts() as $contact => $available) {
if ($available) {
throw new BadRequestHttpException("At least one of the entered contacts cannot be used because it is indicated as available ($contact).");
}
}
$this->eppClient->logout();