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

errors object creating circular structure with yup resolver #660

Open
brianbattenfeld opened this issue Jan 24, 2024 · 0 comments
Open

errors object creating circular structure with yup resolver #660

brianbattenfeld opened this issue Jan 24, 2024 · 0 comments

Comments

@brianbattenfeld
Copy link

Describe the bug
When trying to stringify my errors object, I'm receiving a TypeError Converting circular structure to JSON

To Reproduce
Steps to reproduce the behavior:

  1. Go to the codesandbox https://6x7zpv.csb.app/ (which is a fork of the example found here, with only the JSON.stringify() added)
  2. Fill out no inputs and submit to force an error to be created
  3. See TypeError surfaced in browser

Codesandbox link (Required)

Expected behavior
I'd expect to see the errors object displayed as a string above the form

Screenshots
Screenshot 2024-01-24 at 5 36 23 PM
Screenshot 2024-01-24 at 5 37 04 PM

Desktop (please complete the following information):

  • OS: OSX ventura
  • Browser: chrome
  • Version 119.0.6045.159

Additional context
Stringifying errors (as well as the rest of the formState) is often useful for me and my team to be able to quickly reference within the UI in dev environments to troubleshoot.

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

No branches or pull requests

1 participant