1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-10 05:13:29 +00:00
Files
browser/libs/importer
John Harrington 001f8fa579 PM-23906 Wrap sdk callsite with try/catch to handle errors appropriately (#16410)
* wrap sdk callsite in try/catch to handle error appropriately

`encryptService.decryptString()` calls code in the internal SDK which when provided an invalid
key returns `CryptoError::InvalidMac`. The originating callsite has been wrapped in a try/catch
in order to intercept the error and return false so that logic in parse() may return
a more appropriate error message in the UI.

* add unit test and explanatory comment

* remove misleading comment

* remove null comparison and unused variable
2025-09-16 10:22:05 -07:00
..