Skip to content
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

Update ErrorSchema type #3241

Closed
wants to merge 1 commit into from

Conversation

jcqvisser
Copy link

Reasons for making this change

The current ErrorSchema type-definition does not allow one to create an ErrorSchema as recommended in the documentation.

This fixes #3239.

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

@heath-freenome
Copy link
Member

Interesting that changing the type is causing the tests to break.

@jcqvisser
Copy link
Author

I'll say! Will try and find some time to check it out today...

@heath-freenome
Copy link
Member

heath-freenome commented Nov 29, 2022

@jcqvisser I dug into this and it seems that it is relatively impossible to build a recursive type that works for both writing and reading the data. Since the bulk of the use cases in the code is reading, I will be providing a WritableErrorSchema class that supports building an ErrorSchema that can be converted into a readable one by the class. Stay tuned

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.

Broken ErrorSchema type-definition
2 participants