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

Enable useUnknownInCatchVariables

    • Type: Icon: Improvement Improvement
    • Resolution: Unresolved
    • Priority: Icon: Minor - P4 Minor - P4
    • None
    • Affects Version/s: None
    • Component/s: Error

      How are you using Mongo? What version of the server and driver are you using?

      Driver engineer adopting newer typescript features

      What is the feauture/improvement you would like?

      Enable useUnknownInCatchVariables and add type assertions or remove unnecessary catch blocks.

      What use case would this feature/improvement enable?

      Some of our catch blocks appear to be unnecessary, there's errors that are potentially wrapped that might not need to be. Type checking the error you expect in a catch block is good practice and avoids bugs where you catch a more serious error unintentionally.

            Assignee:
            Unassigned Unassigned
            Reporter:
            neal.beeken@mongodb.com Neal Beeken
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: