Skip to content

Commit

Permalink
bug #32908 [Mailer] Add debug info on HTTP transport exceptions (fabpot)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
fabpot committed Aug 3, 2019
2 parents 5d5e04b + 4cfb4b9 commit f1801a4
Showing 1 changed file with 2 additions and 5 deletions.
Expand Up @@ -47,14 +47,11 @@ protected function doSend(SentMessage $message): void
$response = null;
try {
$response = $this->doSendHttp($message);
$message->appendDebug($response->getInfo('debug'));
} catch (HttpTransportException $e) {
$response = $e->getResponse();
$e->appendDebug($e->getResponse()->getInfo('debug'));

throw $e;
} finally {
if (null !== $response) {
$message->appendDebug($response->getInfo('debug'));
}
}
}
}

0 comments on commit f1801a4

Please sign in to comment.