Skip to content

Handle ValueError for trigger_dag_run API request - #67601

Merged
kaxil merged 1 commit into
apache:mainfrom
VladaZakharova:handle-value-error-for-trigger-dag-run-request
Jul 30, 2026
Merged

Handle ValueError for trigger_dag_run API request#67601
kaxil merged 1 commit into
apache:mainfrom
VladaZakharova:handle-value-error-for-trigger-dag-run-request

Conversation

@MaksYermak

Copy link
Copy Markdown
Contributor

In this PR I have added a code which handle ValueError exception for trigger_dag_run API request and raise HTTPException with 400 http code. These changes improve error messaging from this request and user can see clear message in task logs.


Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

@boring-cyborg boring-cyborg Bot added area:API Airflow's REST/HTTP API area:task-sdk labels May 27, 2026

@SameerMesiah97 SameerMesiah97 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the rationale could be better explained. ValueError is far too broad in this codepath and catching it can make real issues under a generic 400 exception.

@potiuk

potiuk commented May 28, 2026

Copy link
Copy Markdown
Member

@MaksYermak A few things need addressing before review — see our Pull Request quality criteria.

  • Pre-commit / static checks. See docs.

No rush.


Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@potiuk

potiuk commented Jun 9, 2026

Copy link
Copy Markdown
Member

@MaksYermak Converting to draft — this PR does not yet meet our Pull Request quality criteria.

  • Merge conflicts with main. See docs.

See the linked criteria for how to fix each item, then mark the PR "Ready for review". This is not a rejection — just an invitation to bring the PR up to standard. No rush.

Note: This comment was drafted by an AI-assisted triage tool and may contain mistakes. Once you have addressed the points above, an Apache Airflow maintainer — a real person — will take the next look at your PR. We use this two-stage triage process so that our maintainers' limited time is spent where it matters most: the conversation with you.

@potiuk
potiuk marked this pull request as draft June 9, 2026 08:27
@MaksYermak
MaksYermak force-pushed the handle-value-error-for-trigger-dag-run-request branch from 7495da6 to 6d59d27 Compare June 9, 2026 08:36
@MaksYermak
MaksYermak marked this pull request as ready for review June 9, 2026 08:37
@potiuk potiuk added the ready for maintainer review Set after triaging when all criteria pass. label Jun 25, 2026
@MaksYermak
MaksYermak force-pushed the handle-value-error-for-trigger-dag-run-request branch from 6d59d27 to 9fc06e6 Compare July 1, 2026 12:11
@VladaZakharova

Copy link
Copy Markdown
Contributor

@potiuk hi there! can we please review these changes and check if they can be merged? thanks!

@kaxil kaxil added the backport-to-v3-3-test Backport to v3-3-test label Jul 30, 2026
@kaxil
kaxil merged commit bc033da into apache:main Jul 30, 2026
77 checks passed
@github-actions github-actions Bot added this to the Airflow 3.3.2 milestone Jul 30, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Hi maintainer, this PR was merged without a milestone set.
We've automatically set the milestone to Airflow 3.3.2 based on: backport label targeting v3-3-test
If this milestone is not correct, please update it to the appropriate milestone.

This comment was generated by Milestone Tag Assistant.

@github-actions

Copy link
Copy Markdown
Contributor

Backport successfully created: v3-3-test

Note: As of Merging PRs targeted for Airflow 3.X
the committer who merges the PR is responsible for backporting the PRs that are bug fixes (generally speaking) to the maintenance branches.

In matter of doubt please ask in #release-management Slack channel.

Status Branch Result
v3-3-test PR Link

vatsrahul1001 added a commit that referenced this pull request Aug 3, 2026
…) (#70775)

(cherry picked from commit bc033da)

Co-authored-by: Maksim <maksimy@google.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
vatsrahul1001 added a commit that referenced this pull request Aug 5, 2026
…) (#70775)

(cherry picked from commit bc033da)

Co-authored-by: Maksim <maksimy@google.com>
Co-authored-by: Rahul Vats <43964496+vatsrahul1001@users.noreply.github.com>
dabla pushed a commit to dabla/airflow that referenced this pull request Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:API Airflow's REST/HTTP API area:task-sdk backport-to-v3-3-test Backport to v3-3-test ready for maintainer review Set after triaging when all criteria pass.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants