Open vlukashov opened 4 years ago
@Legioth Nice ping that RFC-7807 is very likely included in the error handling in spring 6 / spring boot 3 - I think it would be really good to get familiar with the concept and adapt it in Hilla if feasible
Example on how to use this in Spring MVC: https://www.baeldung.com/spring-boot-return-errors-problemdetail
When calling Vaadin Service methods, Connect validates the parameters passed to the server-side (based on the JSR-380 spec. If validation fails the error details are propagated to the client side using Connect's custom protocol based on the
VaadinConnectException
class (see https://github.com/vaadin/vaadin-connect/blob/master/doc/vaadin-connect-exceptions.asciidoc).There is an RFC that aims at standardizing this scenario: RFC 7807 - Problem Details for HTTP APIs.
Vaadin should consider changing the approach to passing validation error details over HTTP to the client-side so that it uses the RFC instead of the own custom implementation.
Keeping aside the generic 'following standards is better than not following' mantra, some immediate benefits from following this RFC in this case may be