private static String getErrorMessage(Exception exception) {
    String baseMessage = exception.getMessage();
    Throwable rootCause = ExceptionUtils.getRootCause(exception);
    String rootMessage = rootCause != null ? rootCause.getMessage() : StringUtils.EMPTY;
    return StringUtils.isNotEmpty(rootMessage) ? rootMessage : baseMessage;
  }
private static String getErrorMessage(Exception exception)