/**
  * Create the unified exception to throw.
  *
  * @param Request  $request
  * @param Response $response
  *
  * @return HttpRequestException
  */
 protected function createApiException(Request $request, Response $response)
 {
     //$errors = json_decode((string) $response->getBody());
     return new HttpRequestException($response->getCode(), $response->getBody(), $request, $response);
 }