From 9536271f2fd294cfb3b00e330e4cda84e14d8079 Mon Sep 17 00:00:00 2001 From: Valery Vargin Date: Tue, 6 Oct 2020 13:22:19 +0300 Subject: [PATCH] =?UTF-8?q?Hint=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B2=20=D1=82=D0=B5=D0=BA=D1=81=D1=82=20?= =?UTF-8?q?=D0=BE=D1=88=D0=B8=D0=B1=D0=BA=D0=B8,=20=D1=82=D0=B0=D0=BA=20?= =?UTF-8?q?=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=BE=D0=B2=D0=B0=D1=82=D0=B5?= =?UTF-8?q?=D0=BB=D1=8F=D0=BC=20=D0=B1=D1=83=D0=B4=D0=B5=D1=82=20=D0=BF?= =?UTF-8?q?=D0=BE=D0=BD=D1=8F=D1=82=D0=BD=D0=B5=D0=B5=20=D0=B8=D0=B7-?= =?UTF-8?q?=D0=B7=D0=B0=20=D1=87=D0=B5=D0=B3=D0=BE=20=D0=B7=D0=B0=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D1=81=20=D0=BD=D0=B5=20=D0=BE=D1=82=D1=80=D0=B0?= =?UTF-8?q?=D0=B1=D0=B0=D1=82=D1=8B=D0=B2=D0=B0=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/AmoCRMException.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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 +}