private static @NotNull String buildExceptionStacktrace(@NotNull Throwable exception) {
    if (exception.getStackTrace().length == 0) {
      return getRootCauseExceptionMessage(exception);
    }
    return getExceptionStacktrace(exception);
  }
private static @NotNull String buildExceptionStacktrace(@NotNull Throwable exception)