def check_response_errors(response, session):
    '\n    Checks status of response response and throws appropriate error.\n    '
    if (response['status'] != 'ok'):
        from wi.utils.auth import logout
        error_code = response['status']
        error_msg = get_error(error_code)
        raise RestErrorException(error_msg)
    return response
Checks status of response response and throws appropriate error.
def check_response_errors(response, session):
    '\n    \n    '
    if (response['status'] != 'ok'):
        from wi.utils.auth import logout
        error_code = response['status']
        error_msg = get_error(error_code)
        raise RestErrorException(error_msg)
    return response