docs: public void failed(String errorMessage, String errorDetails, int retries, long retryDuration) {
      ensureActive();
  
      this.setErrorMessage(errorMessage);
      if (errorDetails != null) {
        setErrorDetails(errorDetails);
      }
      this.lockExpirationTime = new Date(ClockUtil.getCurrentTime().getTime() + retryDuration);
      setRetriesAndManageIncidents(retries);
      produceHistoricExternalTaskFailedEvent();
    }