Commands that work with namespaces should either work with views, be a no-op, or fail explicitly with the error code CommandNotSupportedOnView. A non-exhaustive list includes
- createIndexes
- dropIndexes
- listIndexes
- reIndex
- renameCollection (with a shell helper renameView)
- collMod
- copydb
- validate
The choice of error versus no-op can be determined on a per-command basis, based on what would be most intuitive for the average user.