diff --git a/composer.json b/composer.json index 7533b00..c4f6bdd 100644 --- a/composer.json +++ b/composer.json @@ -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", diff --git a/src/Microservice.php b/src/Microservice.php index 15901ca..4b76e6b 100644 --- a/src/Microservice.php +++ b/src/Microservice.php @@ -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);