From 21f38f5fa6ef94534b526d840008f655fa879c5a Mon Sep 17 00:00:00 2001 From: Drsdre Date: Thu, 24 Aug 2017 12:41:56 +0200 Subject: [PATCH] Enhance error message on error 400. --- Client.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Client.php b/Client.php index 9b4bfb6..49ce991 100644 --- a/Client.php +++ b/Client.php @@ -448,8 +448,9 @@ protected function executeRequest() { } throw new Exception( - 'Bad Request: ' . implode( ' | ', - $parameter_errors ) . ' (request ' . $this->request->getFullUrl() . ').', + 'Bad Request ' . (isset($result_content->message)?$result_content->message:'unknown') . + ' Params: ' .implode( ' | ', $parameter_errors ) . + ' URL: ' . $this->request->getFullUrl(), $this->response->statusCode ); case 401: