ISSUE SUMMARY
mongos does not set the CursorNotFound bit in the response when the cursor is not found for unsharded collections. Instead it sets the QueryFailure bit. See the response definition here.
USER IMPACT
The wrong message will be returned to the user through their client driver. It is present in versions of MongoDB prior to and including v2.4.6.
SOLUTION
The issue has been solved by bringing the behavior of mongos into accordance with mongod and mongos with sharded collections.
WORKAROUNDS
None
PATCHES
Production release v2.4.7 contains the fix for this issue, and production release v2.6.0 will contain the fix as well.
Original Description
Instead, it sets the QueryFailure bit.
See http://docs.mongodb.org/meta-driver/latest/legacy/mongodb-wire-protocol/#op-reply.
Drivers typically have different exception types for these two bits, so end up throwing a different exception when running against a shard cluster.