Extend MongoParseError

XMLWordPrintableJSON

    • Type: Task
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: Error
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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:

      1. Move `validateDatabaseName()` (src/db.ts) and `checkCollectionName()` (src/utils.ts) into the MongoNamespaceObject as static funcs which throw MongoInvalidNameSpaceError.
      2. Replace references to the funcs with these static funcs where appropriate.
      3. 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

              Assignee:
              Unassigned
              Reporter:
              Andy Mina
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: