[GODRIVER-2840] Lookup* API should return public errors, not experimental ones Created: 10/May/23  Updated: 07/Sep/23  Resolved: 07/Sep/23

Status: Closed
Project: Go Driver
Component/s: BSON
Affects Version/s: 1.11.6
Fix Version/s: None

Type: Task Priority: Major - P3
Reporter: Felipe Gasper Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Duplicate
duplicates GODRIVER-2744 Do not return "bsoncore" errors from ... Backlog
Documentation Changes Summary:

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?


 Description   

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)



 Comments   
Comment by Matt Dale [ 07/Sep/23 ]

This is actually a duplicate of GODRIVER-2744. I've updated the description of that ticket to include all error types listed in this ticket as well.

Generated at Thu Feb 08 08:39:29 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.