[SERVER-44466] Add "errorDocument" field to failCommand fail point Created: 06/Nov/19 Updated: 06/Oct/20 Resolved: 30/Mar/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Shane Harvey | Assignee: | Spencer Brody (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Backport Requested: |
v4.4, v4.2
|
||||||||||||||||||||||||||||
| Sprint: | Service Arch 2020-04-06 | ||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||
| Description |
|
Drivers use the failCommand fail point extensively in spec tests. It seems that with each server release we need to add a new knob to this fail point in order to test new features. In 4.0 we added the "writeConcernError" field ( It might be useful to add a way for the command to specify the entire error document to return instead of just the error code or the errorLabels. For example:
This would also satisfy |
| Comments |
| Comment by Spencer Brody (Inactive) [ 30/Mar/20 ] | ||||||||||||
|
Doing this requires direct access to the ReplyBuilderInterface, which is something we're trying to remove as part of the "Communicate command failures with exceptions, not BSONObj" project. For these reasons, I am proposing that we not do this ticket. | ||||||||||||
| Comment by Shane Harvey [ 24/Feb/20 ] | ||||||||||||
|
Neat, thanks! However I can't seem to get errorExtraInfo to work on v4.3.3-300-gbc9eb30:
Does errorExtraInfo require threadName as well? | ||||||||||||
| Comment by Carl Champain (Inactive) [ 07/Nov/19 ] | ||||||||||||
|
Hi shane.harvey, Passing this ticket along to the Server Development Platform team. |