Skip to content

Commit 51d0d2d

Browse files
committed
check both
1 parent a49c6bc commit 51d0d2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Domains/Registrar/Adapter/NameCom.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class NameCom extends Adapter
3434
public const ERROR_INVALID_DOMAIN = 'Invalid Domain Name';
3535
public const ERROR_INVALID_DOMAINS = 'None of the submitted domains are valid';
3636
public const ERROR_UNSUPPORTED_TLD = 'unsupported tld';
37+
public const ERROR_TLD_NOT_SUPPORTED = 'TLD not supported';
3738
public const ERROR_UNSUPPORTED_TRANSFER = 'do not support transfers for';
3839
public const ERROR_UNAUTHORIZED = 'Unauthorized';
3940

@@ -48,6 +49,7 @@ class NameCom extends Adapter
4849
self::ERROR_INVALID_DOMAIN => null,
4950
self::ERROR_INVALID_DOMAINS => null,
5051
self::ERROR_UNSUPPORTED_TLD => 422,
52+
self::ERROR_TLD_NOT_SUPPORTED => null,
5153
self::ERROR_UNSUPPORTED_TRANSFER => 400,
5254
self::ERROR_UNAUTHORIZED => 401,
5355
];
@@ -393,7 +395,7 @@ public function getPrice(string $domain, int $periodYears = 1, string $regType =
393395
case $e instanceof PriceNotFoundException:
394396
throw $e;
395397

396-
case $this->matchError($e) === self::ERROR_UNSUPPORTED_TLD:
398+
case in_array($this->matchError($e), [self::ERROR_UNSUPPORTED_TLD, self::ERROR_TLD_NOT_SUPPORTED]):
397399
throw new UnsupportedTldException($message, $code, $e);
398400

399401
case in_array($this->matchError($e), [self::ERROR_NOT_FOUND, self::ERROR_INVALID_DOMAIN]):

0 commit comments

Comments
 (0)