> + private int retryCountLimit = 5; > + @Resource > + protected Logger logger = Logger.NULL; > + > + public boolean shouldRetryRequest(HttpCommand command, HttpResponse > response) { > + if (command.getFailureCount() > retryCountLimit) { > + return false; > + } > + if (response.getStatusCode() == 500) { > + byte[] content = > HttpUtils.closeClientButKeepContentStream(response); > + // Content can be null in the case of HEAD requests > + if (content != null) { > + try { > + AtmosError error = utils.parseAtmosErrorFromContent(command, > response, > + new String(content)); > + if (error.getCode() == 1040) { // The server is busy. Please > try again.
As per the pdf document you referred above, when the status code is 500, the only error code for which we should *not* retry is 1020. For all others (including 1040), we should retry. --- Reply to this email directly or view it on GitHub: https://github.com/jclouds/jclouds/pull/285/files#r9610835