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

fix: don't reject asyncErrors #4675

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

jamesmillerburgess
Copy link

Closes #GH-4435

This line was causing unhandled promise rejections any time asyncValidate threw an error during a submit.

We have tested this fork and it made the issue go away, without affecting the errors appearing correctly in our forms.

I also noticed that the tests in handleSubmit.spec.js didn't have expect.assertions statements, which wasn't a problem for most due to a workaround with throwing inside then.

However, this is still a brittle mechanism, so I added expect.assertions to make it more robust. I'm happy to remove that if it shouldn't be in the scope of the PR.

@Imjamper
Copy link

Hi there, any update on this? When this can be merged?

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