Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-97715

Correctly propagate error code in assert.commandFailedWithCode

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 8.1.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Query Execution
    • Fully Compatible
    • QE 2024-12-09
    • 200
    • None
    • 3
    • 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@mongodb.com Ivan Fefer
            Reporter:
            ivan.fefer@mongodb.com Ivan Fefer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: