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

uassertStatusOK() and appendCommandStatus behave differently

    • Type: Icon: Bug Bug
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Internal Code
    • Labels:
      None
    • ALL
    • Platforms 2018-02-26

      uassertStatusOK() expands to calling uassertedWithLocation() with the location code (if one exists), whereas appendCommandStatus() just always uses the error code on the status.

      I don't think this was intentional, and it is pretty surprising that changing a return of a bad status to be a uassertStatusOK() can result in a different error code being returned to the user.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            charlie.swanson@mongodb.com Charlie Swanson
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: