Skip to content

Updates exception to hide sql statements on constraint failure#63028

Open
aritra24 wants to merge 5 commits intoapache:mainfrom
aritra24:cleanup_uniqueness_response
Open

Updates exception to hide sql statements on constraint failure#63028
aritra24 wants to merge 5 commits intoapache:mainfrom
aritra24:cleanup_uniqueness_response

Conversation

@aritra24
Copy link
Collaborator

@aritra24 aritra24 commented Mar 7, 2026

The exception handler now hides the sql statement when the expose stacktrace flag is false.


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.

The exception handler now hides the sql statement when the expose
stacktrace flag is false.
@potiuk
Copy link
Member

potiuk commented Mar 7, 2026

Some test failures :(

@aritra24
Copy link
Collaborator Author

aritra24 commented Mar 7, 2026

Ah shoot, i thought I'd fixed all of them. I'm away until the morning, will push a fix then

aritra24 added 3 commits March 8, 2026 14:58
Since pytest returns a starlette HTTPException
it annotates details as a string, we make use
of FastApi's HTTPException which returns details
as a dict. Due to this mypy get's confused about
some of the operations we're performing on a dict.
@aritra24
Copy link
Collaborator Author

aritra24 commented Mar 8, 2026

Looks like unrelated failures, so merged main in to see if they're older issues already fixed

@aritra24
Copy link
Collaborator Author

aritra24 commented Mar 8, 2026

Hmm, the test looks unrelated to my change.... @potiuk would you be able to retrigger the failed job if you get some time?

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants