def check_action(res):
    """ 
    Check the action status and raise expection if it failed

    Parameters
    ----------
    res : CASResults
        The results from the action

    Raises
    ------
    RuntimeError
        If the action failed

    Returns
    -------
    :class:`CASResults`

    """
    if res.severity > 1:
        raise RuntimeError(res.status)
    return res
