Skip to content

Commit

Permalink
Improve rejection message answer
Browse files Browse the repository at this point in the history
  • Loading branch information
SerafimArts committed Oct 26, 2016
1 parent 6df8b61 commit d1b1fb5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/ClientAdapter/AsyncBuzzAdapter.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,9 @@ public function request(Route $route)
if (json_last_error() === JSON_ERROR_NONE) {
$deferred->resolve($data);
} else {
$deferred->reject(new \InvalidArgumentException(json_last_error_msg()));
$deferred->reject(new \InvalidArgumentException(
json_last_error_msg() . ': ' . $response->getBody()
));
}

}, function(\Throwable $throwable) use ($deferred) {
Expand Down

0 comments on commit d1b1fb5

Please sign in to comment.