src/Magento/Client/Rest/OauthException.php
public static function factory(RequestInterface $request, Response $response)
    {
        $message = 'Client error response' . PHP_EOL . implode(PHP_EOL, array(
            '[status code] ' . $response->getStatusCode(),
            '[reason phrase] ' . $response->getReasonPhrase(),
            '[url] ' . $request->getUrl(),
        ));

        $e = new static($message);
        $e->setResponse($response);
        $e->setRequest($request);

        return $e;
    }
public static function factory(RequestInterface $request, Response $response)
    {
        $message = 'Client error response' . PHP_EOL . implode(PHP_EOL, array(
            '[status code] ' . $response->getStatusCode(),
            '[reason phrase] ' . $response->getReasonPhrase(),
            '[url] ' . $request->getUrl(),
        ));

        $e = new static($message);
        $e->setResponse($response);
        $e->setRequest($request);

        return $e;
    }
public static function factory ( RequestInterface $ request , Response $ response ) { $ message = 'Client error response' . PHP_EOL . implode ( PHP_EOL , array ( '[status code] ' . $ response -> getStatusCode ( ) , '[reason phrase] ' . $ response -> getReasonPhrase ( ) , '[url] ' . $ request -> getUrl ( ) , ) ) ; $ e = new static ( $ message ) ; $ e -> setResponse ( $ response ) ; $ e -> setRequest ( $ request ) ; return $ e ; }
Factory method to create a new Oauth exception.

@param RequestInterface $request
@param Response $response

@return OauthException
Factory method to create a new Oauth exception .