Skip to content

Snowflake: Preserve 422 response payload instead of raising HTTP error. #60765

Closed

Description

@HyunWooZZ

Apache Airflow Provider(s)

snowflake

Versions of Apache Airflow Providers

6.8.2

Apache Airflow version

2.11.0

Operating System

NAME="Amazon Linux" VERSION="2023"

Deployment

Amazon (AWS) MWAA

Deployment details

No response

What happened

When using SnowflakeSqlApiHook HTTP 422 (query failure) responses from the Snowflake SQL API are immediately raised via response.raise_for_status().

Because of this, the response body is never read, and the hook loses the JSON/text payload
returned by Snowflake.
As a result, downstream components (e.g. TriggerEvent logs) only receive a generic ClientResponseError message such as:

422, message='Unprocessable Entity', url='https://<account>.snowflakecomputing.com/...'

What you think should happen instead

We need to pass this payload to _process_response method.
There is already enhanced message payload handler.

How to reproduce

  1. Submit a Snowflake SQL query that results in a statement-level error, for example:
SELECT 1 / 0;
  1. Poll the query status using SnowflakeSqlApiHook.

  2. The Snowflake SQL API returns an HTTP 422 (Unprocessable Entity) response.

  3. The hook raises an HTTP error via response.raise_for_status(), and the response payload is discarded.

Anything else

I will handle this issue with below issue.
#60689

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Activity

  1. added
    kind:bug
    needs-triage
    on Jan 19, 2026
  2. boring-cyborg commented on Jan 19, 2026

    @boring-cyborg

    Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.

  3. added
    provider:snowflake
    on Jan 19, 2026
  4. jroachgolf84 commented on Jan 19, 2026

    @jroachgolf84
    Collaborator

    @HyunWooZZ, please feel free to open a PR for this issue!

  5. removed
    needs-triage
    on Jan 19, 2026
  6. dilshadshaik3031 commented on Jan 21, 2026

    @dilshadshaik3031
    Contributor

    Thanks for reporting this.
    I’m interested in taking a look at this issue and trying to prepare a fix.
    Please let me know if that works.

  7. HyunWooZZ commented on Jan 21, 2026

    @HyunWooZZ
    ContributorAuthor

    @dilshadshaik3031 Thank you for replying!
    However I already did a lot, I'm really sorry for that.

    But i have another issue also, Would you resolve that with me?

  8. dilshadshaik3031 commented on Jan 21, 2026

    @dilshadshaik3031
    Contributor

    Thank you for your response and for all the work you’ve already done — I really appreciate it, and no worries at all 🙂

    Yes, I’d be happy to help with the other issue. Please share the details and I’ll work through it with you.

  9. HyunWooZZ commented on Jan 21, 2026

    @HyunWooZZ
    ContributorAuthor

    @dilshadshaik3031

    Could you see my issue?
    It relate with statement timeout snowflake!
    #60894

  10. potiuk commented on Feb 14, 2026

    @potiuk
    Member

    Apparently closed already in new release - we can reopen if not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area:providerskind:bugprovider:snowflake

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions