After enabling the DEBUG log level, the following exception was swallowed in our production environment.

org.springframework.web.client.ResourceAccessException: I/O error on GET request for "https://xxx.oktapreview.com/.well-known/openid-configuration": Permission denied: connect; nested exception is java.net.SocketException: Permission denied: connect

Comment From: sbrannen

@rstoyanchev, this seems reasonable to me, but I wanted to run it by you first before merging since you may have had a specific reason for not logging the exception.

Comment From: yuezk

Hi guys, any update on this?

Comment From: rstoyanchev

Looks reasonable to add this change as we are already within an isDebugEnabled section, and makes sense to log any exception from getting the status code at the same log level.

This seems to be very long standing behavior (10+years) where an IOException can come mainly from HttpURLConnection, while for other client libraries it's a simple getter. That's probably why it was ignored, but it should actually be logged.

Comment From: yuezk

Shall we back port it to 5.3.x? Thanks.