-
Type: Task
-
Resolution: Duplicate
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: Tech debt
-
None
-
2
-
Not Needed
Some usage of .then() called on a promise with no .catch() inside a try {} catch {}. Not sure if the try/catch is there to catch errors in those promises, but it will only catch the synchronous errors. I'd suggest moving the try/catch to only wrap the code that can throw and be caught by that catch. Or removing it. Maybe rather await the promise rather than use .then() and then errors will correctly bubble up.
There are at least four cases here: https://github.com/mongodb-js/vscode/blob/b5300e1e77fe3f4706cbad1a924c1438855cb99c/src/language/mongoDBService.ts#L214-L216
- duplicates
-
VSCODE-288 try {} catch {} used to wrap asynchronous event callbacks
- Closed
- is related to
-
VSCODE-285 try {} catch {} indiscriminately catching all errors
- Closed