code: function collectionUpdate (collection, result) {
  	result._id = createID(result.pattern, result.language);
  	return collection.insertOne(result)
  		.catch((e) => {
  			// May fail due to concurrent update on the same value.
  			log(`collectionUpdate: error: ${e}`);
  			return Promise.resolve(PATTERN_INVALID);
  		});
  }
docs: Helper for reportResult.