protected function createApiException(Request $request, Response $response)
    {
        //$errors = json_decode((string) $response->getBody());

        return new HttpRequestException(
            $response->getCode(),
            $response->getBody(),
            $request,
            $response
        );
    }
protected function createApiException(Request $request, Response $response)
    {
        //$errors = json_decode((string) $response->getBody());

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

@param Request  $request
@param Response $response

@return HttpRequestException
Create the unified exception to throw .