[SERVER-7169] Provide structured error messages Created: 26/Sep/12  Updated: 06/Dec/22  Resolved: 03/Dec/19

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

Type: Improvement Priority: Major - P3
Reporter: Scott Hernandez (Inactive) Assignee: DO NOT USE - Backlog - Dev Tools
Resolution: Duplicate Votes: 0
Labels: platforms-re-triaged
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates SERVER-44934 support logging the Status type in st... Closed
Assigned Teams:
Developer Tools
Participants:

 Description   

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 ..."
		}
	]
}


Generated at Thu Feb 08 03:13:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.