20 — IllegalOperation
configurationquery
The requested operation is not permitted in this context
What is happening?
IllegalOperation indicates that a command or operation was attempted in a context where it is not allowed. This can occur when running administrative commands on a secondary, using features that require a specific server configuration, or calling operations that are invalid for the current resource type.
Common causes
- Running a write operation against a secondary member
- Attempting capped collection operations on a non-capped collection
- Using an operation that requires a feature flag not enabled
- Attempting to modify a system collection directly