Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-7169

Provide structured error messages

    • Type: Icon: Improvement Improvement
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Diagnostics

      A good example of where this is important are things like mapReduce where it might require authentication to two databases but this is generic to all commands/operations.

      Basically, returning an error string is not sufficient all of the time.

      In the case of mapreduce authentication problems with the destination db you might expect something like this:

      {
      	"errmsg" : "exception: unauthorized db:mrtesttarget ns:mrtesttarget.tmp.mr.imr1_0_inc lock type:1 client:127.0.0.1",
      	"code" : 10057,
      	"ok" : 0,
      	"dbs" : [
      		"sourcedb",
      		"mrtesttarget"
      	],
      	"collections" : [
      		"mrtesttarget.tmp.mr.imr1_0_inc"
      	],
      	"client" : "127.0.0.1",
      	"lockTypeRequired" : 1,
      	"retriable" : true,
      	"errors" : [
      		{
      			"db" : "mrtesttarget",
      			"code" : 10057,
      			"errmsg" : "exception: unauthorized ..."
      		}
      	]
      }

            Assignee:
            backlog-server-devtools DO NOT USE - Backlog - Dev Tools
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: