vaadin / hilla

Build better business applications, faster. No more juggling REST endpoints or deciphering GraphQL queries. Hilla seamlessly connects Spring Boot and React to accelerate application development.
https://hilla.dev
Apache License 2.0
864 stars 58 forks source link

Javascript error on submit for an invalid form #2586

Open jcgueriaud1 opened 6 days ago

jcgueriaud1 commented 6 days ago

Describe the bug

When I submit a form that is invalid I have a javascript error.

Uncaught (in promise) ValidationError: There are validation errors in the form.
 - fullName - NotNull: must not be null
    at BinderRoot.submitTo (chunk-UA3PFYSQ.js?v=5a255b3a:1929:13)

Expected-behavior

I don't expect a javascript error for a validation error that is handled in my form. Especially because the documentation says:

Submission failures are handled automatically, so there is no need to do an explicit try-catch.

https://vaadin.com/docs/latest/hilla/guides/forms/binder-load#saving-data

Reproduction

Run this project: https://github.com/jcgueriaud1/hilla-example-form

Go to the home page and click on save, see the error in the console.

System Info

Vaadin 24.4.4