-
Type: Task
-
Resolution: Unresolved
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: Error
Use Case
As a Node driver use
I want more descriptive parse error types
So that when something fails, I know where to look for the cause.
Acceptance Criteria
Implementation Requirements
Extend MongoParseError to include the following errors:
- MongoConnectionStringError
- MongoMessageStreamParseError
- MongoBSONParseError
- MongoInvalidNamespaceError
The new children errors should be define, implemented, and tested.
MongoInvalidNamespaceError is a three step process:
- Move `validateDatabaseName()` (src/db.ts) and `checkCollectionName()` (src/utils.ts) into the MongoNamespaceObject as static funcs which throw MongoInvalidNameSpaceError.
- Replace references to the funcs with these static funcs where appropriate.
- Use these funcs to replace raw string parsing where appropriate.
Testing Requirements
See the testing plan at [docs/errors.md|http://example.com],
Documentation Requirements
- DOCSP ticket, API docs, etc
Follow Up Requirements
- additional tickets to file, required releases, etc
- is depended on by
-
NODE-3509 Update in-repository documentation on new error types
- Closed