8000 Catch http-client:4.3 exception · symfony/symfony@ba54492 · GitHub
[go: up one dir, main page]

Skip to content

Commit ba54492

Browse files
author
Olivier Dolbeau
committed
Catch http-client:4.3 exception
1 parent 1e0bd0a commit ba54492

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/Symfony/Component/Notifier/Bridge/Esendex/EsendexTransport.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
namespace Symfony\Component\Notifier\Bridge\Esendex;
1313

1414
use Symfony\Component\HttpClient\Exception\JsonException;
15+
use Symfony\Component\HttpClient\Exception\TransportException as HttpClientTransportException;
1516
use Symfony\Component\Notifier\Exception\LogicException;
1617
use Symfony\Component\Notifier\Exception\TransportException;
1718
use Symfony\Component\Notifier\Message\MessageInterface;
@@ -86,6 +87,9 @@ protected function doSend(MessageInterface $message): SentMessage
8687

8788
$message .= sprintf(' Details from Esendex: %s: "%s".', $error['code'], $error['description']);
8889
}
90+
} catch (HttpClientTransportException $e) {
91+
// Catching this exception is useful to keep compatibility, with symfony/http-client:4.3
92+
// See https://github.com/symfony/symfony/pull/37065
8993
} catch (JsonException $e) {
9094
}
9195

0 commit comments

Comments
 (0)
0