Skip to content

Commit

Permalink
Force nicer error handling
Browse files Browse the repository at this point in the history
  • Loading branch information
ehacke committed Dec 30, 2015
1 parent 322b361 commit 4af8334
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Http/GuzzleRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,11 @@ protected function parseErrorMessage(ClientException $guzzleException)
};
}

return (string) $response->xml()->message;
try {
return (string)$response->xml()->message;
} catch (\Exception $ex) {
return 'Excpetion while processing error response. Error reason phrase: ' . $response->getReasonPhrase();
}
}

/**
Expand Down

0 comments on commit 4af8334

Please sign in to comment.