src/ApiClientException.php
public function getRequestException()
    {
        if (!is_null($this->requestException)) {
            return $this->requestException;
        }

        $search = function (\Exception $exception = null) use (&$search) {
            $previous = $exception->getPrevious();

            if (is_null($previous)) {
                return null;
            }

            if ($previous instanceof RequestException) {
                return $this->requestException = $previous;
            }

            return $search($previous);
        };

        return $search($this);
    }
public function getRequestException()
    {
        if (!is_null($this->requestException)) {
            return $this->requestException;
        }

        $search = function (\Exception $exception = null) use (&$search) {
            $previous = $exception->getPrevious();

            if (is_null($previous)) {
                return null;
            }

            if ($previous instanceof RequestException) {
                return $this->requestException = $previous;
            }

            return $search($previous);
        };

        return $search($this);
    }
public function getRequestException ( ) { if ( ! is_null ( $ this -> requestException ) ) { return $ this -> requestException ; } $ search = function ( \ Exception $ exception = null ) use ( & $ search ) { $ previous = $ exception -> getPrevious ( ) ; if ( is_null ( $ previous ) ) { return null ; } if ( $ previous instanceof RequestException ) { return $ this -> requestException = $ previous ; } return $ search ( $ previous ) ; } ; return $ search ( $ this ) ; }
Return the response body of the exception

@return null|RequestException
Return the response body of the exception