[SERVER-51338] Mongo shell v4.4 reports a non-specific exception when a malformed URI is supplied Created: 03/Oct/20 Updated: 06/Jun/23 Resolved: 08/Oct/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Shell |
| Affects Version/s: | 4.4.0 |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Minor - P4 |
| Reporter: | Dmitry Ryabtsev | Assignee: | Backlog - Triage Team |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Triage
|
| Operating System: | ALL |
| Participants: |
| Description |
|
Accidentally encountered this while connecting to my Atlas cluster. Essentially if the supplied URI is malformed, the shell fails with the exception: No digits error which does not really articulate what the problem is exactly:
|
| Comments |
| Comment by Mark Stosberg [ 06/Jun/23 ] | ||||
|
This error can also occur with a valid query string that is surrounded by smart quotes instead of regular quotes. It took us awhile to spot that some app had converted the quotes. 🤦🏼♂️ It would be great if that condition could be flagged, with an error like "It looks like you used smart quotes. Use regular single or double quotes for your connection string". | ||||
| Comment by Kelsey Schubert [ 08/Oct/20 ] | ||||
|
Thanks for investigating! | ||||
| Comment by Dmitry Ryabtsev [ 07/Oct/20 ] | ||||
|
mongosh is producing the correct (meaningful) error:
I guess we can close this one off. | ||||
| Comment by Kelsey Schubert [ 05/Oct/20 ] | ||||
|
Is this a problem with the new shell, mongosh? If it is, I would suggest moving this ticket for team to work on. If not, I think we should close this ticket as we're focusing on improving mongosh for end-user behavior. |