misd-service-development / guzzle-bundle

[NOT MAINTAINED] Integrates Guzzle into your Symfony2 application
99 stars 54 forks source link

Param Converter Passes Original Guzzle Exception #23

Closed rsahlstrom closed 11 years ago

rsahlstrom commented 11 years ago

When the GuzzleParamConverter finds a 404 error, the bundle throws a NotFoundHttpException. This commit modifies that thrown exception to also include with it the original Guzzle Exception.

This allows listeners of kernal.exception to check the NotFoundHttpException for any BadResponseExceptions and work with the additional information in the Guzzle request or response objects attached to the BadResponseException.

thewilkybarkid commented 11 years ago

:thumbsup:

Ideally this would have been on the 1.0 branch, I'll cherry pick it to save reopening.