-
Type: Question
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Aggregation Framework
-
None
-
Minor Change
Some shell helpers throw when a server error is encountered (eg find, group, mapReduce). The aggregate shell helper does not, instead returning a document with ok:0.
Test
t = db.t; t.drop(); // Invalid matcher syntax. printjson( t.aggregate( { $match:{ a:{ $mod:[ 0 /* invalid */, 0 ] } } } ) );
Result
{ "errmsg" : "exception: mod can't be 0", "code" : 10073, "ok" : 0 }
- is related to
-
SERVER-8805 aggregation $within command: exception thrown
- Closed