[SERVER-3764] Normalize command return values on error. Created: 06/Sep/11  Updated: 29/Jan/18  Resolved: 16/Jun/17

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

Type: Improvement Priority: Major - P3
Reporter: Kyle Banker Assignee: DO NOT USE - Backlog - Platform Team
Resolution: Won't Fix Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Participants:

 Description   

When a command fails, the response object currently contains various combinations of the following fields:

'err'
'errmsg'
'assertion'
'code'
'assertionCode'

For example, see the return value for:
db.runCommand(

{forceerror: 1}

)

This is a bit awkward from a client perspective. Can we normalize on 'err' and 'code'? If the different fields indicate different kinds of errors, we should specify that in yet another field, e.g., 'errorType'.


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