Skip to content

Commit

Permalink
Default to retry on all exceptions except InvalidResponse
Browse files Browse the repository at this point in the history
Signed-off-by: Peter Nied <[email protected]>
  • Loading branch information
peternied committed Aug 8, 2024
1 parent 08e32ba commit 06baae8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RFS/src/main/java/com/rfs/common/OpenSearchClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ private Optional<ObjectNode> createObjectIdempotent(
.retryWhen(
Retry.backoff(3, Duration.ofSeconds(1))
.maxBackoff(Duration.ofSeconds(10))
.filter(OperationFailed.class::isInstance)
.filter(throwable -> !(throwable instanceof InvalidResponse)) // Do not retry on this exception
)
.block();

Expand Down

0 comments on commit 06baae8

Please sign in to comment.