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(form): handle exceptions in form #91

Merged
merged 1 commit into from
Nov 13, 2024

Conversation

miguelgrc
Copy link
Collaborator

Added error boundaries to catch errors e.g. with invalid JSON schemas in FormuleForm and display them properly

issues.
</li>
<li>
When you get this error, you usually want to be looking at
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • since we aim for external use, lets make the error element customizable and passed through the context provider (with a default as you have it).
  • in the default we should also update the text to mention that it can also be a uiSchema issue (e.g widget/field non existant, etc)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

In that case I think we should allow providing a custom ErrorBoundary directly, this way it's even more flexible (you can provide an antd error boundary with a different message or a fully custom one with your own logic, and otherwise we use the default).

Copy link
Collaborator

Choose a reason for hiding this comment

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

ok lets go this way

* Add default error boundary for form
* Allow users to provide a custom error boundary
@pamfilos pamfilos merged commit 8e09624 into cern-sis:master Nov 13, 2024
2 checks passed
@cern-sis-bot
Copy link
Collaborator

🎉 This PR is included in version 1.2.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants