KEYCLOAK-2847 Fix exception convertor for Wildfly
This commit is contained in:
parent
536b88790e
commit
13e4f607ad
1 changed files with 1 additions and 1 deletions
|
@ -55,7 +55,7 @@ public class PersistenceExceptionConverter implements InvocationHandler {
|
||||||
public static ModelException convert(Throwable t) {
|
public static ModelException convert(Throwable t) {
|
||||||
if (t.getCause() != null && t.getCause() instanceof ConstraintViolationException) {
|
if (t.getCause() != null && t.getCause() instanceof ConstraintViolationException) {
|
||||||
throw new ModelDuplicateException(t);
|
throw new ModelDuplicateException(t);
|
||||||
} if (t instanceof EntityExistsException) {
|
} if (t instanceof EntityExistsException || t instanceof ConstraintViolationException) {
|
||||||
throw new ModelDuplicateException(t);
|
throw new ModelDuplicateException(t);
|
||||||
} else {
|
} else {
|
||||||
throw new ModelException(t);
|
throw new ModelException(t);
|
||||||
|
|
Loading…
Reference in a new issue