private Map < String , Object > extractErrorDetailsFromResponse ( ClientHttpResponse response ) throws IOException { ObjectMapper mapper = new ObjectMapper ( new JsonFactory ( ) ) ; try { return mapper . < Map < String , Object > > readValue ( response . getBody ( ) , new TypeReference < Map < String , Object > > ( ) { } ) ; } catch ( JsonParseException e ) { return null ; } }
Error details are returned in the message body as JSON . Extract these in a map