diff --git a/clientlibs/java/pom.xml b/clientlibs/java/pom.xml
index 82bdb2e9f8..0c3b559425 100644
--- a/clientlibs/java/pom.xml
+++ b/clientlibs/java/pom.xml
@@ -8,8 +8,8 @@
changed in the next comment. that increases the likelihood that two PRs in-flight
at the same time that happen to rev to the same new version will be caught
by a merge conflict. -->
-
- 3.1.4
+
+ 3.1.5
diff --git a/clientlibs/java/src/main/java/org/upgradeplatform/utils/PublishingRetryCallback.java b/clientlibs/java/src/main/java/org/upgradeplatform/utils/PublishingRetryCallback.java
index 1b57e4ef33..41bc619726 100644
--- a/clientlibs/java/src/main/java/org/upgradeplatform/utils/PublishingRetryCallback.java
+++ b/clientlibs/java/src/main/java/org/upgradeplatform/utils/PublishingRetryCallback.java
@@ -7,6 +7,7 @@
import javax.ws.rs.core.Response;
import static javax.ws.rs.core.Response.Status.Family.SUCCESSFUL;
+import static javax.ws.rs.core.Response.Status.Family.CLIENT_ERROR;
public class PublishingRetryCallback implements InvocationCallback {
@@ -35,7 +36,10 @@ public PublishingRetryCallback(AsyncInvoker invoker, Entity message, int retr
@Override
public void completed(Response response) {
- if (SUCCESSFUL.equals(response.getStatusInfo().getFamily()) || retries <= 0) {
+ boolean isSuccess = SUCCESSFUL.equals(response.getStatusInfo().getFamily());
+ boolean isClientRequestError = CLIENT_ERROR.equals(response.getStatusInfo().getFamily());
+
+ if (isSuccess || isClientRequestError || retries <= 0) {
callback.completed(response);
} else {
retry();
diff --git a/clientlibs/java/src/main/java/org/upgradeplatform/utils/Utils.java b/clientlibs/java/src/main/java/org/upgradeplatform/utils/Utils.java
index aea88d1e87..178971926f 100644
--- a/clientlibs/java/src/main/java/org/upgradeplatform/utils/Utils.java
+++ b/clientlibs/java/src/main/java/org/upgradeplatform/utils/Utils.java
@@ -33,7 +33,7 @@ public class Utils
public static final String PATCH = "PATCH";
- public static final int MAX_RETRIES = 3;
+ public static final int MAX_RETRIES = 1;
public static enum RequestType {