diff --git a/src/Exceptions/ServiceUnavailable.php b/src/Exceptions/ServiceUnavailable.php index 87f170a..339874c 100644 --- a/src/Exceptions/ServiceUnavailable.php +++ b/src/Exceptions/ServiceUnavailable.php @@ -2,7 +2,9 @@ namespace h4kuna\Fio\Exceptions; -class ServiceUnavailable extends \RuntimeException +use Psr\Http\Client\ClientExceptionInterface; + +class ServiceUnavailable extends \RuntimeException implements ClientExceptionInterface { } diff --git a/src/Utils/Queue.php b/src/Utils/Queue.php index 93bf8ce..383676c 100644 --- a/src/Utils/Queue.php +++ b/src/Utils/Queue.php @@ -104,7 +104,7 @@ private function request(string $token, RequestInterface $request): ResponseInte return $response; } catch (ClientExceptionInterface $e) { $message = str_replace($token, Strings::truncate($token, 10), $e->getMessage()); - throw new Exceptions\ServiceUnavailable($message, $e->getCode(), $e); + throw new Exceptions\ServiceUnavailable($message, $e->getCode()); // in url is token, don't need keep previous exception } finally { fclose($file); }