-
Type: Improvement
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
None
-
Catalog and Routing
-
2
Currently, there isn't a convenient way in the test infrastructure to parse a command response and get information about whether it completed successfully or not, with what error code it failed, if it's retryable, if it got other errors such like write errors or write concern errors, etc.
There are some helpers like the assert.commandFailed family of functions, or sh.assertRetryableCommandWorkedOrFailedWithCodes, but there is no general method to inspect such errors and so people end up rolling up their own all over the test code base.
The goal of this ticket is to come up with a coherent utility library to cover all these use cases.