misd-service-development / guzzle-bundle

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

Reponse body for non 20X status code #80

Closed Ghriim closed 9 years ago

Ghriim commented 9 years ago

When the response has not a 20X return code an exception is raised wich so it seams that I can't acces to the body of my response anymore. In my case, in some scenario the API will return me a 403 with a message in the body explaining why the action is forbidden.

How can I recover this message if an exception is thrown ?

Ghriim commented 9 years ago

Ok this one is on me. I've found out that I can get the response from the exception then acceed to the body from their. Sorry.