private static @NotNull String getRootCauseExceptionMessage(@NotNull Throwable exception) {
    Throwable rootCauseException = exception;
    while (rootCauseException.getCause() != null) {
      rootCauseException = rootCauseException.getCause();
    }
    String message = rootCauseException.getMessage();
    if (message == null) {
      message = exception.getMessage();
    }
    if (message == null) {
      message = exception.getClass().getName();
    }
    return message;
  }
private static @NotNull String getRootCauseExceptionMessage(@NotNull Throwable exception)