Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-5214

Improve BSON decoding InvalidBSON error message

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • 4.13
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • Python Drivers
    • None
    • None
    • None
    • None
    • None
    • None

      Our current _decode_all() method can raise an InvalidBSON("invalid object size") error for bad BSON messages. This provides no useful information to the user, and should be replaced with a more helpful one such as

       

      "invalid object size: expected {obj_size}, got {data_len - position}"
      

       

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            noah.stapp@mongodb.com Noah Stapp
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              None
              None
              None
              None