[SERVER-17726] Improve error messages when parsing config file for mongod Created: 24/Mar/15 Updated: 06/Dec/22 |
|
| Status: | Backlog |
| Project: | Core Server |
| Component/s: | Admin, Usability |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor - P4 |
| Reporter: | Dwight Merriman | Assignee: | Backlog - Security Team |
| Resolution: | Unresolved | Votes: | 0 |
| Labels: | platform-lhf | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Assigned Teams: |
Server Security
|
| Participants: |
| Description |
|
Some specific issues: 1) on the command line one types --dbpath. in the config file, it is dbPath:. lowercase isn't supported. that may be wise, however i suggest the error message if you typed the tolower of a valid parm name should be " ... , did you mean dbPath:?" also if i have a tab, intentionally to test the error message, i get this:
2) does illegal map value actually mean something to the user? (i don't know yaml well.) would "unexpected character" make more sense? the position is given which is nice. 3) can we just scan the whole file for a tab up front and say "tabs are not legal in yaml" as that is going to happen A LOT (if we don't want to just accept them as equivalent to a space, even though YAML doesn't...) 4) If I have an unknown option in a sub-section, the error message returned to the user says that the top level section is unknown. e.g.,
|