Skip to content

feat: (de)serialize any instances of Error in QueryState.error while (de)hydrating #116

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

n0099
Copy link

@n0099 n0099 commented May 27, 2025

πŸ”— Linked issue

#108

❓ Type of change

  • πŸ“– Documentation (updates to the documentation, readme or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Based on #115.
Users will need to addKnownErrorConstructor(SomeDerviedError) if they're using something like e instanceof SomeDerviedError: n0099/open-tbm@1f8a220#diff-0f75652bede5b3ab02fab6d24c628b1963347f8aa2d54ff8e23bd738a0941250R18-R26

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@n0099 n0099 requested a review from Hebilicious as a code owner May 27, 2025 03:46
Copy link

changeset-bot bot commented May 27, 2025

⚠️ No Changeset found

Latest commit: a8a2c49

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Owner

@Hebilicious Hebilicious left a comment

Choose a reason for hiding this comment

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

looks good, thanks

fix: only (de)serialize `state.fetchFailureReason` and `state.failureReason` when it is or like error
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants