diff --git a/src/main/java/org/genesys2/client/oauth/GenesysClient.java b/src/main/java/org/genesys2/client/oauth/GenesysClient.java index d237a37541829d3ddd840e4fde9d6c21e24eadee..b9c7d458922953ee6da24f7eae48f4bd45f16599 100644 --- a/src/main/java/org/genesys2/client/oauth/GenesysClient.java +++ b/src/main/java/org/genesys2/client/oauth/GenesysClient.java @@ -267,7 +267,7 @@ public class GenesysClient { LOG.error(new String(postBody)); LOG.error("HTTP response code: {}", response.getCode()); LOG.error("Response: {}", responseBody); - if (responseBody.contains("Deadlock found when trying to get lock; try restarting transaction") + if (response.getCode() == 504 || responseBody.contains("Deadlock found when trying to get lock; try restarting transaction") || responseBody.contains("nested exception is org.hibernate.exception.LockAcquisitionException: could not execute statement") || responseBody.contains("nested exception is org.hibernate.exception.LockTimeoutException: could not execute statement")) { throw new PleaseRetryException(responseBody);