protected function parseResponseInternal($response)
    {
        try {
            $result = $this->parseResponse($response);
            if (!isset($result)) {
                throw new ErrorException(Yii::t('eauth', 'Invalid response format.'), 500);
            }

            $error = $this->fetchResponseError($result);
            if (isset($error) && !empty($error['message'])) {
                throw new ErrorException($error['message'], $error['code']);
            }

            return $result;
        } catch (\Exception $e) {
            throw new ErrorException($e->getMessage(), $e->getCode());
        }
    }
protected function parseResponseInternal($response)
    {
        try {
            $result = $this->parseResponse($response);
            if (!isset($result)) {
                throw new ErrorException(Yii::t('eauth', 'Invalid response format.'), 500);
            }

            $error = $this->fetchResponseError($result);
            if (isset($error) && !empty($error['message'])) {
                throw new ErrorException($error['message'], $error['code']);
            }

            return $result;
        } catch (\Exception $e) {
            throw new ErrorException($e->getMessage(), $e->getCode());
        }
    }
protected function parseResponseInternal ( $ response ) { try { $ result = $ this -> parseResponse ( $ response ) ; if ( ! isset ( $ result ) ) { throw new ErrorException ( Yii :: t ( 'eauth' , 'Invalid response format.' ) , 500 ) ; } $ error = $ this -> fetchResponseError ( $ result ) ; if ( isset ( $ error ) && ! empty ( $ error [ 'message' ] ) ) { throw new ErrorException ( $ error [ 'message' ] , $ error [ 'code' ] ) ; } return $ result ; } catch ( \ Exception $ e ) { throw new ErrorException ( $ e -> getMessage ( ) , $ e -> getCode ( ) ) ; } }
Parse response and check for errors.

@param string $response
@return mixed
@throws ErrorException
Parse response and check for errors .