126 — RPCProtocolNegotiationFailed

queryconfiguration

An unknown or invalid aggregation pipeline operator was used

What is happening?

InvalidPipelineOperator is returned when an aggregation pipeline contains a stage or expression operator that the server does not recognise. This typically indicates a misspelled operator name, a stage available only in a newer server version, or using a query operator inside an aggregation context where it is not valid.

Common causes

  1. Typo in a pipeline stage name (e.g. $groupBy instead of $group)
  2. Using an aggregation stage introduced in a newer server version
  3. Confusing query operators with aggregation expression operators
  4. Using Atlas-only operators ($search, $vectorSearch) on a self-managed deployment

Source code references

ErrorCodes::RPCProtocolNegotiationFailed found in 3 locations in the MongoDB server source.

Diagnostic Steps