src/Magento/Client/Rest/OauthException.php
/**
     * Factory method to create a new Oauth exception.
     *
     * @param RequestInterface $request
     * @param Response $response
     *
     * @return OauthException
     */
Factory method to create a new Oauth exception.
@param RequestInterface $request
@param Response $response


Factory method to create a new Oauth exception . @param RequestInterface $request @param Response $response
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.
Factory method to create a new Oauth exception .