Open
Description
Body
Improve error handling when accessing dag via the dag bag. The error response should allow user to know if the dag is found in db and failing to deserialize or just missing from the db. Both status code could still be a 404.
In such pattern:
dag = request.app.state.dag_bag.get_dag(dag_id)
if not dag:
raise HTTPException(status.HTTP_404_NOT_FOUND, f"DAG with dag_id: `{dag_id}` was not found")
related #48776
Currently if deserialization fails, it will blow up with a 500 error.
Committer
- I acknowledge that I am a maintainer/committer of the Apache Airflow project.
Metadata
Metadata
Assignees
Type
Projects
Status
No status