Skip to content

mark dag_run as failed internally, eg, in one of the internal tasks #9209

@ChristianYeah

Description

@ChristianYeah

airflow: 1.10.10

I searched google for marking a single dag run as failed if some task logic doesn't meet with a particular condition.

for example, if task A requests the URL, the expected result should be error_code == 0.
Now I manually do something like print(1/0) to raise the exception if I get error_code 1.

Is that possible to manually mark the dag_run as failed internally?

Thank you very much

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions