Correctly propagate error code in assert.commandFailedWithCode

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.1.0-rc0, 8.0.12
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2024-12-09
    • 200
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Usually, the exception, thrown by assert.commandFailedWithCode(result) will contain the result's error code.

      That is important when this assertion is wrapped in something like retryOnRetriableErrors (example).

      However, on some variants (for example, on write errors) this doesn't happen.

            Assignee:
            Ivan Fefer
            Reporter:
            Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: