diff --git a/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/hibernate/JpaMapExceptionConverter.java b/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/hibernate/JpaMapExceptionConverter.java index 5f697eb50a..a111c0f01f 100644 --- a/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/hibernate/JpaMapExceptionConverter.java +++ b/model/map-jpa/src/main/java/org/keycloak/models/map/storage/jpa/hibernate/JpaMapExceptionConverter.java @@ -34,7 +34,7 @@ public class JpaMapExceptionConverter implements ExceptionConverter, Environment @Override public Throwable convert(Throwable e) { if (!(e instanceof PersistenceException)) return null; - return PersistenceExceptionConverter.convert(e.getCause() != null ? e.getCause() : e); + return PersistenceExceptionConverter.convert(e); } @Override