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

Remove appendCommandStatus() in favor of throwing exceptions

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.0.0-rc0
    • None
    • Internal Code
    • None
    • Minor Change
    • Platforms 2018-05-07, Platforms 2018-05-21

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: