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
-------
4cfb4b95d6
[Mailer] added debug info on HTTP transport exceptions
This commit is contained in:
commit
f1801a4f8d
@ -47,14 +47,11 @@ abstract class AbstractHttpTransport extends AbstractTransport
|
|||||||
$response = null;
|
$response = null;
|
||||||
try {
|
try {
|
||||||
$response = $this->doSendHttp($message);
|
$response = $this->doSendHttp($message);
|
||||||
|
$message->appendDebug($response->getInfo('debug'));
|
||||||
} catch (HttpTransportException $e) {
|
} catch (HttpTransportException $e) {
|
||||||
$response = $e->getResponse();
|
$e->appendDebug($e->getResponse()->getInfo('debug'));
|
||||||
|
|
||||||
throw $e;
|
throw $e;
|
||||||
} finally {
|
|
||||||
if (null !== $response) {
|
|
||||||
$message->appendDebug($response->getInfo('debug'));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user