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

        return new TmdbApiException(
            isset($errors->status_code) ? $errors->status_code : $response->getCode(),
            isset($errors->status_message) ? $errors->status_message : null,
            $request,
            $response,
            $previous
        );
    }
protected function createApiException(Request $request, Response $response, \Exception $previous= null)
    {
        $errors = json_decode((string) $response->getBody());

        return new TmdbApiException(
            isset($errors->status_code) ? $errors->status_code : $response->getCode(),
            isset($errors->status_message) ? $errors->status_message : null,
            $request,
            $response,
            $previous
        );
    }
protected function createApiException ( Request $ request , Response $ response , \ Exception $ previous = null ) { $ errors = json_decode ( ( string ) $ response -> getBody ( ) ) ; return new TmdbApiException ( isset ( $ errors -> status_code ) ? $ errors -> status_code : $ response -> getCode ( ) , isset ( $ errors -> status_message ) ? $ errors -> status_message : null , $ request , $ response , $ previous ) ; }
Create the unified exception to throw

@param  Request          $request
@param  Response         $response
@param \Exception        $previous
@return TmdbApiException
Create the unified exception to throw