spring-boot icon indicating copy to clipboard operation
spring-boot copied to clipboard

Provide mappings and ExtractingResponseErrorHandler configuration for ErrorAttributes responses

Open DanielThomas opened this issue 7 years ago • 0 comments

The new ExtractingResponseErrorHandler is a huge help when configuring RestTemplate to handle the standard error attributes returned by a Spring Boot service, but still requires implementing logic to convert those responses.

An ErrorAttributes message converter and a subclass of ExtractingResponseErrorHandler and perhaps even a convenience method on RestTemplateBuilder would help immensely in providing RestTemplate configuration that works better out of the box with Boot services.

In this particular case, we have server errors including the stacktraces, and it means we can surface the exception on the client with the server error nested (similar to suppressed exception output).

DanielThomas avatar Apr 11 '18 19:04 DanielThomas