code: private void fireWorkContextSetupFailed(Object workContext, String errorCode,
                                             WorkListener workListener, Work work, WorkException exception)
     {
        if (workListener != null)
        {
           WorkEvent event = new WorkEvent(this, WorkEvent.WORK_STARTED, work, null);
           workListener.workStarted(event);
        }
  
        if (workContext instanceof WorkContextLifecycleListener)
        {
           WorkContextLifecycleListener listener = (WorkContextLifecycleListener) workContext;
           listener.contextSetupFailed(errorCode);
        }
  
        if (workListener != null)
        {
           WorkEvent event = new WorkEvent(this, WorkEvent.WORK_COMPLETED, work, exception);
           workListener.workCompleted(event);
        }
     }
docs: Calls listener with given error code.
  @param workContext work context listener
  @param errorCode error code
  @param workListener work listener
  @param work work instance
  @param exception exception