Skip to content

Make serde errors for unsupported types a bit more actionable - #70974

Open
amoghrajesh wants to merge 2 commits into
apache:mainfrom
astronomer:better-error-message-serde
Open

Make serde errors for unsupported types a bit more actionable#70974
amoghrajesh wants to merge 2 commits into
apache:mainfrom
astronomer:better-error-message-serde

Conversation

@amoghrajesh

Copy link
Copy Markdown
Contributor

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

Previously these errors said only that a type could not be (de)serialized, giving no indication of what to do about it.
Error looked like

TypeError: cannot serialize object of type <class 'pandas.DataFrame'>

Example in #70791

Name the two ways a Dag author can make their own class work

  • a serialize/deserialize method pair
  • or @dataclass/@attr.define)

and link to the docs page that already covers all the options in full, instead of leaving people to dig through source to find them.


  • 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.

@Lee-W Lee-W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

Comment thread task-sdk/src/airflow/sdk/serde/__init__.py Outdated
Comment thread task-sdk/tests/task_sdk/serde/test_serde.py Outdated
Comment thread task-sdk/tests/task_sdk/serde/test_serde.py Outdated
Comment thread task-sdk/src/airflow/sdk/serde/__init__.py Outdated
@amoghrajesh
amoghrajesh requested a review from kaxil August 3, 2026 09:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants