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

Remove appendCommandStatus() in favor of throwing exceptions

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 4.0.0-rc0
    • Affects Version/s: None
    • Component/s: Internal Code
    • None
    • Minor Change
    • Platforms 2018-05-07, Platforms 2018-05-21

      Now we have two ways to return an error to clients: appendCommandStatus() and throwing exceptions, e.g. uassertStatusOK(). It'll be great if throwing exceptions is the only way to do so.

      SERVER-34256 appends error labels for certain error codes only in transaction. The information whether the user indicates running in a transaction is currently only available in service_entry_point_common.cpp, so appendCommandStatus() doesn't have enough information to append the label. We have to do that afterwards by inspecting the response.

            Assignee:
            mathias@mongodb.com Mathias Stearn
            Reporter:
            siyuan.zhou@mongodb.com Siyuan Zhou
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: