Logging should be more detailed. You should post what URI you hit, (for what task ID), and what the error code and response was from the server. For example:

LOG.error(String.format("Couldn't fetch task %s files from slave from %s due to code %s - %s", taskId, uri, statusCode, responseError))