From b661b9f680f6f3bbcd282eba0b7fccc636941111 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Fromme?= Date: Wed, 17 Dec 2025 10:11:53 +0100 Subject: [PATCH] fix: correctly integrate with logger --- .../typo3conf/ext/ep_products/Classes/MyEP/ApiClient.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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());