mirror of
https://github.com/stablyai/orca.git
synced 2026-10-25 08:04:05 +00:00
fix(browser): match the unknown decrypt reason explicitly
CI's type-aware code-quality gate flagged the reason switch as non-exhaustive: the 'unknown' member was handled by `default:` rather than matched. Matching it explicitly keeps the behaviour identical today and makes the gate enforce the thing that matters — adding a new reason to the union now fails the switch instead of falling silently into a generic message that would not describe it. This gate is separate from `oxlint` and is not covered by running oxlint on the changed files, which is why it only surfaced in CI.
This commit is contained in:
@@ -47,7 +47,7 @@ function formatCookieImportWarning(warning: CookieImportWarning): string {
|
||||
'{{value0}} cookies could not be decrypted because the system keyring was unavailable. Unlock your login keyring (or install a Secret Service provider such as gnome-keyring) and import again.',
|
||||
{ value0: warning.failedCookies }
|
||||
)
|
||||
default:
|
||||
case 'unknown':
|
||||
return translate(
|
||||
'auto.lib.browser.cookie.import.toast.undecryptableUnknown',
|
||||
'{{value0}} cookies could not be decrypted and were skipped. Close the source browser completely and try the import again.',
|
||||
|
||||
Reference in New Issue
Block a user