diff --git a/src/AmoCRMException.php b/src/AmoCRMException.php index 7e66d4a..0340bbc 100644 --- a/src/AmoCRMException.php +++ b/src/AmoCRMException.php @@ -19,8 +19,12 @@ public static function errorResponse(ResponseInterface $response, $data) $message .= ': ' . $data['detail']; } + if (!empty($data['hint'])) { + $message .= " ({$data['hint']})"; + } + $code = $response->getStatusCode(); $body = (string)$response->getBody(); return new static($message, $code, $body); } -} \ No newline at end of file +}