Currently WebClientResponseException exposes the body as a byte[] or String and so does RestClientResponseException. It would be useful if these exposed convenience methods to decode an RFC 7807 formatted response to ProblemDetail.

The exceptions could be created with a Callable<ProblemDetail> or similar to decouple them from the details of decoding, or perhaps the decoding could be done automatically for such a response and the ProblemDetail passed in to the exception.