-
Type: Improvement
-
Resolution: Unresolved
-
Priority: 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.