Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-1963

Better error message for featureCompatibilityVersion

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      I tried inserting some dec128 into mongo. This immediately kills the connection with a not so helpful error message:

      Failed to send "insert" command with database "test": socket error or timeout
      

      Looking in the mongod log files the real problem is this:

      2016-12-21T16:39:42.585+0100 I -        [conn344] AssertionException handling request, closing client connection: 22 Client Error: bad object in message: Cannot use decimal BSON type when the featureCompatibilityVersion is 3.2. See http://dochub.mongodb.org/core/3.4-feature-compatibility.
      2016-12-21T16:39:42.585+0100 I -        [conn344] end connection 127.0.0.1:61918 (1 connection now open)
      

      Is it expected that the connection is killed when inserting dec128 in mongo 3.2? Perhaps the C driver could return a more helpful error message, something that hints at featureCompatibilityVersion? How should I request featureCompatibilityVersion 3.4 in the client?

            Assignee:
            bjori Hannes Magnusson
            Reporter:
            Jeroenooms Jeroen Ooms [X]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: