code: public static OperationResult failed(long index, long eventIndex, Throwable error) {
      return new OperationResult(index, eventIndex, error, null);
    }
docs: Returns a failed operation result.
  
  @param index the result index
  @param eventIndex the session's last event index
  @param error the operation error
  @return the operation result