> + 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.
Let's go with this commit as-is; we have a convenient table if we need to
revisit this.
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/285/files#r9641179