java – How can I read body from javax.ws.rs Response from exception?

I make post request like this, which I got from other answers:

try{
    WebClient client = tokenAuth.addAuthentication(WebClient.create(url))
                                .type(AccelaradMediaType.SMR_IMAGE_SHARE_V3_JSON)
                                .accept(AccelaradMediaType.SMR_SHARE_RESULT_JSON);

    responseString = client.post(body, String.class);
}
catch (WebApplicationException e) {
    Response response = e.getResponse();
    String message = response.readEntity(String.class); // THIS DOESN'T WORK!
    ...
}

However, response.readEntity(String.class) was having problem, so I read the log and it says this:

09/08/21 14:11:11.654 DEBUG http-nio-8080-exec-9 org.springframework.security.web.header.writers.HstsHeaderWriter - Not injecting HSTS header since it did not match the requestMatcher org.springframework.security.web.header.writers.HstsHeaderWriter$SecureRequestMatcher@6a382cea

I am guessing there is an issue with parsing the header, but not sure what is going on. Is there way to fix this or get a body from the response in my catch block?