diff --git a/public/typo3conf/ext/ep_products/Classes/MyEP/ApiClient.php b/public/typo3conf/ext/ep_products/Classes/MyEP/ApiClient.php index 6ab173a4..02253227 100644 --- a/public/typo3conf/ext/ep_products/Classes/MyEP/ApiClient.php +++ b/public/typo3conf/ext/ep_products/Classes/MyEP/ApiClient.php @@ -5,14 +5,17 @@ namespace EP\EpProducts\MyEP; use League\OAuth2\Client\Provider\AbstractProvider; use League\OAuth2\Client\Provider\GenericProvider; use League\OAuth2\Client\Token\AccessToken; +use Psr\Log\LoggerAwareInterface; use Psr\Log\LoggerAwareTrait; +use Symfony\Component\HttpClient\Exception\ClientException; use Symfony\Component\HttpClient\HttpClient; +use Symfony\Contracts\HttpClient\Exception\HttpExceptionInterface; use Symfony\Contracts\HttpClient\Exception\TransportExceptionInterface; use Symfony\Contracts\HttpClient\HttpClientInterface; use TYPO3\CMS\Core\Configuration\ExtensionConfiguration; use TYPO3\CMS\Core\Utility\GeneralUtility; -class ApiClient +class ApiClient implements LoggerAwareInterface { use LoggerAwareTrait; @@ -113,6 +116,8 @@ class ApiClient $httpClient->request('POST', 'contactform', [ 'json' => $addressData, ]); + } catch (ClientException $e) { + $this->logger->warning($e->getMessage()); } catch (TransportExceptionInterface $e) { $this->logger->error($e->getMessage()); throw new ApiException($e->getMessage());