Skip to content

Commit f1801a4

Browse files
committed
bug #32908 [Mailer] Add debug info on HTTP transport exceptions (fabpot)
This PR was merged into the 4.4 branch. Discussion ---------- [Mailer] Add debug info on HTTP transport exceptions | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no <!-- please update src/**/CHANGELOG.md files --> | BC breaks? | no <!-- see https://symfony.com/bc --> | Deprecations? | no <!-- please update UPGRADE-*.md and src/**/CHANGELOG.md files --> | Tests pass? | yes <!-- please add some, will be required by reviewers --> | Fixed tickets | n/a | License | MIT | Doc PR | n/a Same as #32896 but for HTTP transports. Commits ------- 4cfb4b9 [Mailer] added debug info on HTTP transport exceptions
2 parents 5d5e04b + 4cfb4b9 commit f1801a4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Symfony/Component/Mailer/Transport/AbstractHttpTransport.php

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,11 @@ protected function doSend(SentMessage $message): void
4747
$response = null;
4848
try {
4949
$response = $this->doSendHttp($message);
50+
$message->appendDebug($response->getInfo('debug'));
5051
} catch (HttpTransportException $e) {
51-
$response = $e->getResponse();
52+
$e->appendDebug($e->getResponse()->getInfo('debug'));
5253

5354
throw $e;
54-
} finally {
55-
if (null !== $response) {
56-
$message->appendDebug($response->getInfo('debug'));
57-
}
5855
}
5956
}
6057
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy