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

Lookup* API should return public errors, not experimental ones

    • Type: Icon: Task Task
    • Resolution: Duplicate
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.11.6
    • Component/s: BSON
    • None
    • Hide

      1. What would you like to communicate to the user about this feature?
      2. Would you like the user to see examples of the syntax and/or executable code and its output?
      3. Which versions of the driver/connector does this apply to?

      Show
      1. What would you like to communicate to the user about this feature? 2. Would you like the user to see examples of the syntax and/or executable code and its output? 3. Which versions of the driver/connector does this apply to?

      Right now bson.Raw.LookupErr can return 3 errors:

      • bsoncore.ErrElementNotFound
      • bsoncore.InsufficientBytesError
      • bsoncore.InvalidDepthTraversalError

      All of these are experimental errors, not part of the Go driver’s stable API. LookupErr would be much more useful, though, if its returned errors were part of the Go driver’s stable API.

      This ticket requests that change. Ideally it would also be great to have LookupErr’s documentation (and documentation of whatever other methods) mention those specific (public) errors.

      Thank you!

      (cc matt.dale@mongodb.com)

            Assignee:
            Unassigned Unassigned
            Reporter:
            felipe.gasper@mongodb.com Felipe Gasper
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: