Skip to content

Commit

Permalink
Disable Guzzle exception for error responses
Browse files Browse the repository at this point in the history
Our HTTP client is expected to return the response for 4xx and 5xx, not to throw an exception
  • Loading branch information
stof committed Jul 11, 2014
1 parent bee4756 commit 0897187
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/Stampie/Adapter/Guzzle.php
Expand Up @@ -41,7 +41,7 @@ public function getClient()
*/
public function send($endpoint, $content, array $headers = array())
{
$request = $this->client->createRequest(RequestInterface::POST, $endpoint, $headers, $content);
$request = $this->client->createRequest(RequestInterface::POST, $endpoint, $headers, $content, array('exceptions' => false));
$response = $request->send();

return new Response($response->getStatusCode(), $response->getBody(true));
Expand Down

0 comments on commit 0897187

Please sign in to comment.