code: public void addErrorResult(final MongoBulkWriteException exception, final IndexMap indexMap) {
          addResult(exception.getWriteResult(), indexMap);
          mergeWriteErrors(exception.getWriteErrors(), indexMap);
          mergeWriteConcernError(exception.getWriteConcernError());
      }
docs: Add an error result
  
  @param exception the exception
  @param indexMap  the index map