Commit 96dc2037 authored by Matija Obreza's avatar Matija Obreza

Retry on Gateway timeout response

parent 39f2a0a0
Pipeline #5571 passed with stage
in 35 seconds
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment