private static @NotNull String extractDetails(@NotNull Throwable e) {
    var unwrapped = RemoteUtil.unwrap(e);
    if (unwrapped instanceof ExternalSystemException esException) {
      var reason = esException.getOriginalReason();
      if (!reason.isEmpty()) {
        return reason;
      }
    }
    return ExternalSystemApiUtil.stacktraceAsString(e);
  }
private static @NotNull String extractDetails(@NotNull Throwable e)