diff --git a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Tombstone.java b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Tombstone.java index 933c682eb..de8058c21 100644 --- a/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Tombstone.java +++ b/irs-models/src/main/java/org/eclipse/tractusx/irs/component/Tombstone.java @@ -123,7 +123,8 @@ private static String getRootErrorMessages(final Throwable throwable) { if (cause != null) { Throwable rootCause = cause; int depth = 0; - while (rootCause.getCause() != null || hasSuppressedExceptions(rootCause) || depth > 10) { + final int maxDepth = 10; + while (rootCause.getCause() != null || hasSuppressedExceptions(rootCause) || depth > maxDepth) { if (hasSuppressedExceptions(rootCause)) { rootCause = rootCause.getSuppressed()[0]; } else {