[SERVER-41365] Improve unhelpful error "ns not found" Created: 28/May/19 Updated: 21/May/20 Resolved: 20/May/20 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Storage, Usability |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Major - P3 |
| Reporter: | Dan Dascalescu | Assignee: | Dianna Hohensee (Inactive) |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | neweng, pull-request | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||
| Sprint: | Execution Team 2020-05-04, Execution Team 2020-05-18, Execution Team 2020-06-01 | ||||||||||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||||||||||
| Linked BF Score: | 0 | ||||||||||||||||||||||||||||||||
| Description |
|
https://stackoverflow.com/questions/37136204/mongoerror-ns-not-found-when-try-to-drop-collection Mongo should say WHICH collection was not found. |
| Comments |
| Comment by Matt Broadstone [ 21/May/20 ] |
|
Hi dandv, |
| Comment by Dan Dascalescu [ 20/May/20 ] |
|
Understandable, but sad to see that due to some unreliably designed old drivers, all current developers have to get confused by this error. |
| Comment by Dianna Hohensee (Inactive) [ 20/May/20 ] |
|
Closing this as Won't Do. Discussed via email with the Drivers team, and they will take on the work to surface an improved error message to the end user. Server will not be making any changes to the error message because it would break compatibility with old driver versions that depend upon an exact string match. It was agreed that |
| Comment by Dianna Hohensee (Inactive) [ 14/May/20 ] |
|
Our commit hook didn't fire for some reason. Writing it myself Message: Revert " This reverts commit 485fdf001d39c7f809ead645d5d892b5094e9431. |
| Comment by Dianna Hohensee (Inactive) [ 14/May/20 ] |
|
It turns out errInfo does not get returned in the relevant command responses. Reverting the change that breaks downstream for now. |
| Comment by Eric Milkie [ 07/May/20 ] |
|
Let's consider using errInfo instead of changing the error message itself for this, to avoid breaking drivers. |
| Comment by Githook User [ 05/May/20 ] |
|
Author: {'name': 'William Reiske', 'email': 'wreiske@mieweb.com', 'username': 'wreiske'}Message: |
| Comment by Oleg Pudeyev (Inactive) [ 08/Oct/19 ] |
|
FYI, Ruby and potentially other drivers perform substring matches looking for the phrase "ns not found" to handle these errors specially (such as ignoring them when trying to drop collections). As long as dropping a nonexistent collection is an error (but I filed |
| Comment by Dan Dascalescu [ 29/May/19 ] |
|
While it wasn't extremely difficult to determine which collection the error was about, it's a matter of Writing Good Error Messages 101 to make errors as helpful as possible. First off, I had no idea what "ns" meant. I had to Google the error. This is a sign of failure on the part of the error. Second, there's no stack trace pointing to client code. This makes it harder to pinpoint the line that caused the error. Apologies for filing the ticket under the Node Driver. Please move to the appropriate SERVER component.
|
| Comment by Matt Broadstone [ 29/May/19 ] |
|
Hi dandv, Thanks for your report. The error you're running into is actually from the server, and it's one of our drivers mantras to depend on relaying server message when possible. Was it difficult to determine which collection failed from the backtrace of the error? I would recommend opening a SERVER ticket if you feel there would be value to displaying the failed namespace in the error. |