Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3338

Allow MongoDriverError to accept error detail options

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: Error

      Use Case

      As a node driver developer
      I want to be able to create more informative error objects
      So that I can improve the user error experience

      Dependencies

      • None

      Unknowns

      • What needs to get updated for TypeScript to accept the adjusted class definition

      Acceptance Criteria

      • Allow the MongoDriverError class constructor to accept an options object
      • Pass the 'ENOENT' code as an option to the constructor instead of setting after the fact in src/gridfs-stream/download.ts
      Implementation Requirements
      • There should be no breaking changes
      Testing Requirements
      • Existing unit tests should pass
      • Create a new unit test for the shape of the MongoDriverError object when options are passed in
      Documentation Requirements
      • None
      Follow Up Requirements
      • additional tickets to file, required releases, etc

            Assignee:
            Unassigned Unassigned
            Reporter:
            daria.pardue@mongodb.com Daria Pardue
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: