This should be a general exception logging to error not debug, and you should catch IOException where you then cast to HttpResponseException, pull out the response object and then output the error message to an error log.