Skip to content

Commit

Permalink
Enhance error message on error 400.
Browse files Browse the repository at this point in the history
  • Loading branch information
drsdre committed Aug 24, 2017
1 parent b7d2b8c commit 21f38f5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 21f38f5

Please sign in to comment.