def is_valid_error_cls(cls):
    """
    Check whether the supplied object is valid VK API error
    exception class.
    :param cls: Class object to be checked
    :rtype: bool
    """
    valid_name = cls.__name__.endswith('Error')
    valid_attrs = hasattr(cls, 'error_code')
    return valid_name and valid_attrs