[SERVER-1685] Review error handling Created: 25/Aug/10  Updated: 23/Feb/17  Resolved: 23/Feb/17

Status: Closed
Project: Core Server
Component/s: Usability
Affects Version/s: Backlog
Fix Version/s: None

Type: Task Priority: Minor - P4
Reporter: Michael Dirolf Assignee: Unassigned
Resolution: Incomplete Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Participants:

 Description   

This case is intentionally vague. The basic point is that we should go through every mechanism where an error is returned to the client and try to make that error reporting as uniform as possible. Here's one example (but there are certainly more). A failed group will get picked up by a following getLastError:

> db.runCommand({group: {$keyf: "5 ++ 5", $reduce: "", ns: "test", cond: {}, initial: {}}});

{ "errmsg" : "exception: reduce setup exec failed", "code" : 10228, "ok" : 0 } > db.runCommand("getLastError"); { "err" : "reduce setup exec failed", "code" : 10228, "n" : 0, "ok" : 1 }

A failed M/R won't:

> db.runCommand(

{mapReduce: "test", map: "5 ++ 5", reduce: ""}

);

{ "assertion" : "map compile failed: JS Error: SyntaxError: syntax error reduce setup:0", "assertionCode" : 9012, "errmsg" : "db assertion failure", "ok" : 0 } > db.runCommand("getLastError"); { "err" : null, "n" : 0, "ok" : 1 }

Please add comments w/ any additional specific inconsistencies.


Generated at Thu Feb 08 02:57:44 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.