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.
Hilla already provides some error-handling mechanisms to catch errors occurring in the backend. However, for many use cases, having a global unified way to do error handling would be beneficial (at least one wouldn't have to repeat the same code in multiple endpoint methods).
Hilla should provide an application-wide convention for error handling, perhaps similar to Spring's @ExceptionHandler + @ControllerAdvice:
@ControllerAdvice
public class RestResponseEntityExceptionHandler
extends ResponseEntityExceptionHandler {
@ExceptionHandler(value
= { IllegalArgumentException.class, IllegalStateException.class })
protected ResponseEntity<Object> handleConflict(
RuntimeException ex, WebRequest request) {
String bodyOfResponse = "This should be application specific";
return handleExceptionInternal(ex, bodyOfResponse,
new HttpHeaders(), HttpStatus.CONFLICT, request);
}
}
Hilla already provides some error-handling mechanisms to catch errors occurring in the backend. However, for many use cases, having a global unified way to do error handling would be beneficial (at least one wouldn't have to repeat the same code in multiple endpoint methods).
Hilla should provide an application-wide convention for error handling, perhaps similar to Spring's
@ExceptionHandler
+@ControllerAdvice
: