def _log_error_and_abort(ret, obj):
    '''
    helper function to update errors in the return structure
    '''
    ret['result'] = False
    ret['abort'] = True
    if 'error' in obj:
        ret['comment'] = '{0}'.format(obj.get('error'))
    return ret
helper function to update errors in the return structure