diff --git a/Plan/common/src/main/java/com/djrapitops/plan/exceptions/database/DBOpException.java b/Plan/common/src/main/java/com/djrapitops/plan/exceptions/database/DBOpException.java index d408f5b4b6..e9d0f4ef70 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/exceptions/database/DBOpException.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/exceptions/database/DBOpException.java @@ -169,6 +169,6 @@ && getCause() != null public boolean isDuplicateKeyViolation() { return context != null - && context.getRelated().contains(DBOpException.CONSTRAINT_VIOLATION); + && context.getRelated().contains(DBOpException.DUPLICATE_KEY); } } diff --git a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/PingStoreTransaction.java b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/PingStoreTransaction.java index 79aefaa78f..7a3d448bca 100644 --- a/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/PingStoreTransaction.java +++ b/Plan/common/src/main/java/com/djrapitops/plan/storage/database/transactions/events/PingStoreTransaction.java @@ -60,7 +60,7 @@ protected void performOperations() { execute(DataStoreQueries.storePing(playerUUID, serverUUID, ping)); } catch (DBOpException failed) { if (userInsertError != null) failed.addSuppressed(userInsertError); - if (failed.isUserIdConstraintViolation()) { + if (failed.isUserIdConstraintViolation() || failed.isDuplicateKeyViolation()) { retry(ping, failed); } else { throw failed;