Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1551

Allow BSON undefined to decode to Go types

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Minor - P4 Minor - P4
    • 1.4.0
    • Affects Version/s: 1.3.1
    • Component/s: BSON
    • None

      The driver already allows decoding BSON Null as an integer type and it should do the same for the BSON Undefined type.

      This caused an error in ADL because the shell's `db.stats()` command sends the `scale` parameter as BSON undefined, which was not coerced to an integer but failed decoding instead:

      > db.stats()
      {
              "ok" : 0,
              "errmsg" : "failed to parse command: cannot decode undefined into an integer type, correlationID = 16025a5ab6004ec18d14584f",
              "code" : 9,
              "codeName" : "FailedToParse"
      }
      

            Assignee:
            divjot.arora@mongodb.com Divjot Arora (Inactive)
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: