From 06baae8aec8a54302a1d2c2d66f020107bf26d67 Mon Sep 17 00:00:00 2001 From: Peter Nied Date: Thu, 8 Aug 2024 17:40:30 +0000 Subject: [PATCH] Default to retry on all exceptions except InvalidResponse Signed-off-by: Peter Nied --- RFS/src/main/java/com/rfs/common/OpenSearchClient.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/RFS/src/main/java/com/rfs/common/OpenSearchClient.java b/RFS/src/main/java/com/rfs/common/OpenSearchClient.java index cc8e5b5af..b596ca54f 100644 --- a/RFS/src/main/java/com/rfs/common/OpenSearchClient.java +++ b/RFS/src/main/java/com/rfs/common/OpenSearchClient.java @@ -141,7 +141,7 @@ private Optional 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();