EAuthServiceBase::fetchJsonError PHP Method

fetchJsonError() protected method

Returns the error info from json.
protected fetchJsonError ( stdClass $json ) : array
$json stdClass the json response.
return array the error array with 2 keys: code and message. Should be null if no errors.
    protected function fetchJsonError($json)
    {
        if (isset($json->error)) {
            return array('code' => 500, 'message' => 'Unknown error occurred.');
        } else {
            return null;
        }
    }