Skip to content

Instantly share code, notes, and snippets.

@rodurma
Created December 18, 2018 23:47
Show Gist options
  • Save rodurma/5ba67e9add34d0fdb18c6c97a5842510 to your computer and use it in GitHub Desktop.
Save rodurma/5ba67e9add34d0fdb18c6c97a5842510 to your computer and use it in GitHub Desktop.
Pegando o body de uma requisição que gerou uma Exception GuzzleHttp
<?php
try {
// do something...
} catch (\GuzzleHttp\Exception\ClientException $e) {
return $e->getResponse()->getBody()->getContents();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment