Parsing an exception instead of List of entities is not working, when using TestRestTemplate and MockRestServiceServer Parsing an exception instead of List of entities is not working, when using TestRestTemplate and MockRestServiceServer json json

Parsing an exception instead of List of entities is not working, when using TestRestTemplate and MockRestServiceServer


Then the returned Exceptions can't be parsed to the List which then give the following error: - You are asking jackson to map exception to profile list which is obviously failing.

Why not use response type as MyClientCallException instead of ParameterizedTypeReference<List> ? - this should allow jackson to parse the exception response stream to MyClientCallException

Also if you would like to know why RestClientException is not treated same as other client errors - https://github.com/spring-projects/spring-framework/commit/b84fefc430cdf10d428b02f6d61009b7460ae26f#diff-309e077b6d47c54260c59a899971042456c5e03eb5e96e5121c31842b55deedb