Skip to content

Commit

Permalink
fix exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewPattell committed May 22, 2020
1 parent bcc57a4 commit 1cacbfd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kakadu-dev/php-ijson-microservices",
"version": "1.1.0",
"version": "1.1.1",
"description": "Package for create microservice architecture based on PHP.",
"homepage": "https://github.com/kakadu-dev/php-ijson-microservices",
"type": "library",
Expand Down
2 changes: 1 addition & 1 deletion src/Microservice.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ public function sendServiceRequest(string $service, string $method, $data, bool
$response = json_decode($rawResponse->getContents(), true);

if (!empty($response['error'])) {
throw new MicroserviceException($response['error']);
throw new MicroserviceException($response['error']['message'] ?? 'Unknown error.');
}

return new MjResponse($response);
Expand Down

0 comments on commit 1cacbfd

Please sign in to comment.