Fix problem when Hibernate exception is hidden when executing "ClientScopeTest".

This behavior changed when upgrading to Hibernate 6
This commit is contained in:
Alexander Schwartz 2023-03-27 18:23:45 +02:00 committed by Václav Muzikář
parent 16d4c732e0
commit b7d5b6a135

View file

@ -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