Closed
Description
This log is really too verbose, not all 4xx are error conditions, many REST apis will return perfectly expected 4xx (eg: checking if a given resource exists) and yielding a warning is too much:
private void handleResponseError(HttpMethod method, URI url, ClientHttpResponse response) throws IOException {
if (logger.isWarnEnabled()) {
try {
logger.warn("Async " + method.name() + " request for \"" + url + "\" resulted in " +
response.getRawStatusCode() + " (" + response.getStatusText() + "); invoking error handler");
}
catch (IOException ex) {
// ignore
}
}
getErrorHandler().handleError(url, method, response);
}
I'm aware AsyncRestTemplate is deprecated and gone from 6.0, so this only affects 5.3.x and older... and I'm also on the way to remove it from my code, but we still have a significant amount of code using it and this issue has bothered us forever. As it's trivial to fix, I decided to log it here just in case you want to consider it.