protected function verifyErrorFormat($body, $httpStatusCode)
    {
        if (is_array($body) === false)
        {
            $this->throwServerError($body, $httpStatusCode);
        }

        if ((isset($body['error']) === false) or
            (isset($body['error']['code']) === false))
        {
            $this->throwServerError($body, $httpStatusCode);
        }

        $code = $body['error']['code'];

        if (Errors\ErrorCode::exists($code) === false)
        {
            $this->throwServerError($body, $httpStatusCode);
        }
    }
protected function verifyErrorFormat($body, $httpStatusCode)
    {
        if (is_array($body) === false)
        {
            $this->throwServerError($body, $httpStatusCode);
        }

        if ((isset($body['error']) === false) or
            (isset($body['error']['code']) === false))
        {
            $this->throwServerError($body, $httpStatusCode);
        }

        $code = $body['error']['code'];

        if (Errors\ErrorCode::exists($code) === false)
        {
            $this->throwServerError($body, $httpStatusCode);
        }
    }
protected function verifyErrorFormat ( $ body , $ httpStatusCode ) { if ( is_array ( $ body ) === false ) { $ this -> throwServerError ( $ body , $ httpStatusCode ) ; } if ( ( isset ( $ body [ 'error' ] ) === false ) or ( isset ( $ body [ 'error' ] [ 'code' ] ) === false ) ) { $ this -> throwServerError ( $ body , $ httpStatusCode ) ; } $ code = $ body [ 'error' ] [ 'code' ] ; if ( Errors \ ErrorCode :: exists ( $ code ) === false ) { $ this -> throwServerError ( $ body , $ httpStatusCode ) ; } }
Verifies error is in proper format. If not then
throws ServerErrorException

@param  array $body
@param  int $httpStatusCode
@return void
Verifies error is in proper format . If not then throws ServerErrorException