[GODRIVER-1668] Improve error message when required field is empty Created: 29/Jun/20  Updated: 28/Oct/23  Resolved: 26/Apr/23

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

Type: Improvement Priority: Major - P3
Reporter: Divjot Arora (Inactive) Assignee: Matt Dale
Resolution: Fixed Votes: 0
Labels: rp-track
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Documentation Changes: Not Needed
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   

If a Database with an empty name is made, the first operation on that database will error with the Database field must be set on Operation. This error message comes from the driver.InvalidOperationError type (https://github.com/mongodb/mongo-go-driver/blob/master/x/mongo/driver/operation.go#L49) and could be improved to something like "database name cannot be empty".



 Comments   
Comment by Githook User [ 20/Apr/23 ]

Author:

{'name': 'stephentth', 'email': '25250133+stephentth@users.noreply.github.com', 'username': 'stephentth'}

Message: GODRIVER-1668: specify database name empty error (#1211)
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/099e6f54ad9679b0e3a91752b3ea23d98edd6596

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