Skip to content

Make database errors in the REST API more human readable #48432

Open
@tirkarthi

Description

@tirkarthi

Apache Airflow version

main (development)

If "Other Airflow 2 version" selected, which one?

No response

What happened?

While trying to create a dag with same logical date this results in unique constraint error but the UI seems to display the sql query through _UniqueConstraintErrorHandler implementation which is not user friendly. It should say that the dagrun with logical_date exists which is more helpful.

Image

What you think should happen instead?

No response

How to reproduce

  1. Run a dag with a logical_date in the UI.
  2. Run the dag again with same logical_date.

Operating System

Ubuntu 20.04.3

Versions of Apache Airflow Providers

No response

Deployment

Virtualenv installation

Deployment details

No response

Anything else?

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

Labels

affected_version:3.0Issues Reported for 3.0area:APIAirflow's REST/HTTP APIkind:bugThis is a clearly a bugpriority:mediumBug that should be fixed before next release but would not block a release

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions