def command_endpoint(fn):
    '\n    Decorator for command line endpoints that only parse dags or tasks but do\n    not execute them. If it tails, it prints error message to stderror, then\n    calls with exit code 1.\n    '

    @wraps(fn)
    def wrapper(**kwargs):
        try:
            fn(**kwargs)
        except Exception as e:
            print(f'Error: {e}', file=sys.stderr)
            sys.exit(1)
    return wrapper
Decorator for command line endpoints that only parse dags or tasks but do
not execute them. If it tails, it prints error message to stderror, then
calls with exit code 1.
def command_endpoint(fn):
    '\n    Decorator for command line endpoints that only parse dags or tasks but do\n    not execute them. If it tails, it prints error message to stderror, then\n    calls with exit code 1.\n    '

    @wraps(fn)
    def wrapper(**kwargs):
        try:
            fn(**kwargs)
        except Exception as e:
            print(f'Error: {e}', file=sys.stderr)
            sys.exit(1)
    return wrapper