40: ConflictingUpdateOperators
MongoDBWhat does it mean?
An update applied more than one conflicting update operator to the same field (path). MongoDB cannot modify the same path twice in a single operation.
Why does it happen?
Conflicting operators targeting the same field in one update document (e.g. both $set and $inc, or modifying a parent and a child path at the same time), a badly constructed update, or a nested path conflict.
How to fix it
Merge the conflicting operators on the same field into a single operator, or split the update into separate operations. Do not modify a parent and a child path (e.g. a and a.b) at the same time. Review the update document and make sure each field is modified only once.