diff --git a/transactionoutbox-core/src/main/java/com/gruelbox/transactionoutbox/spi/Utils.java b/transactionoutbox-core/src/main/java/com/gruelbox/transactionoutbox/spi/Utils.java index da52b267..1b7f51a3 100644 --- a/transactionoutbox-core/src/main/java/com/gruelbox/transactionoutbox/spi/Utils.java +++ b/transactionoutbox-core/src/main/java/com/gruelbox/transactionoutbox/spi/Utils.java @@ -25,7 +25,7 @@ public static boolean safelyRun(String gerund, ThrowingRunnable runnable) { } } - public static boolean indexViolation(Exception e) { + public static boolean indexViolation(Throwable e) { return (e instanceof SQLIntegrityConstraintViolationException) || (e.getClass().getName().equals("org.postgresql.util.PSQLException") && e.getMessage().contains("constraint"))