Skip to content

Commit

Permalink
Retry on errors 500 (#694)
Browse files Browse the repository at this point in the history
  • Loading branch information
yahavi authored Jan 15, 2023
1 parent 9469eff commit d8ef157
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,7 @@ private class PreemptiveRetryStrategy implements ServiceUnavailableRetryStrategy

@Override
public boolean retryRequest(HttpResponse response, int executionCount, HttpContext context) {
// Code 500 means an unexpected behavior of Artifactory, thus we should not retry.
if (response.getStatusLine().getStatusCode() > 500) {
if (response.getStatusLine().getStatusCode() >= 500) {
HttpClientContext clientContext = HttpClientContext.adapt(context);
log.warn("Error occurred for request " + clientContext.getRequest().getRequestLine().toString() +
". Received status code " + response.getStatusLine().getStatusCode() +
Expand Down

0 comments on commit d8ef157

Please sign in to comment.