From 1b0281014e5a46aa7c26db46bfef9aa535f0badb Mon Sep 17 00:00:00 2001 From: Hugo Renard Date: Thu, 17 Mar 2022 11:21:44 +0100 Subject: [PATCH] only retry on network issues --- src/main/java/sh/libre/scim/core/ScimClient.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/sh/libre/scim/core/ScimClient.java b/src/main/java/sh/libre/scim/core/ScimClient.java index ec39def16e..3551c5070e 100644 --- a/src/main/java/sh/libre/scim/core/ScimClient.java +++ b/src/main/java/sh/libre/scim/core/ScimClient.java @@ -2,6 +2,7 @@ package sh.libre.scim.core; import javax.persistence.EntityManager; import javax.persistence.NoResultException; +import javax.ws.rs.ProcessingException; import javax.ws.rs.client.Client; import com.unboundid.scim2.client.ScimService; @@ -44,6 +45,7 @@ public class ScimClient { RetryConfig retryConfig = RetryConfig.custom() .maxAttempts(10) .intervalFunction(IntervalFunction.ofExponentialBackoff()) + .retryExceptions(ProcessingException.class) .build(); registry = RetryRegistry.of(retryConfig); }