Skip to content

Commit d609712

Browse files
committed
Add a retry on TOO_MANY_REQUESTS (429)
1 parent 1bc780d commit d609712

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/main/java/org/hibernate/infra/replicate/jira/service/jira/client/JiraRestClientBuilder.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ private boolean shouldRetryOnException(Throwable throwable) {
316316
// no point in retrying that ...
317317
return false;
318318
}
319+
if (Response.Status.TOO_MANY_REQUESTS.getStatusCode() == exception.statusCode()) {
320+
// we probably were trying to assign to an inactive or incorrectly configured
321+
// user and the request failed,
322+
// no point in retrying that ...
323+
return false;
324+
}
319325
}
320326
return false;
321327
}

0 commit comments

Comments
 (0)