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

Create IDL definition for ErrorReply

    XMLWordPrintableJSON

Details

    • Icon: Task Task
    • Resolution: Fixed
    • Icon: Major - P3 Major - P3
    • 4.9.0
    • None
    • None
    • None
    • Fully Compatible
    • Repl 2020-11-02, Repl 2020-11-16

    Description

      Create a struct in basic_types.idl:

      enums:
        OkZeroEnum:
          description: "An error reply's 'ok' value"
          type: int
          values:
            kZero: 0
       
      structs:
        ErrorReply:
          description: "Error reply structure for all commands"
          strict: false
          fields:
            ok: OkZeroEnum
            code: int
            codeName: string
            errmsg: string
            errorLabels:
              type: array<string>
              optional: true
      

      Today we generate error replies with two handwritten functions, appendCommandStatusNoThrow and augmentReplyWithStatus. Update these functions to use ErrorReply.

      Attachments

        Activity

          People

            george.wangensteen@mongodb.com George Wangensteen
            samy.lanka@mongodb.com Samyukta Lanka
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: