backups: Fix showing proper error for incorrect passphrase

Tests:

- Provide incorrect passphrase when adding a remote repository. Should show a
message that passphrase is incorrect and redirect back to add remote repository
form.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
Sunil Mohan Adapa 2026-02-05 19:03:54 -08:00
parent e21ab91b21
commit 4ae66c034c
No known key found for this signature in database
GPG Key ID: 43EA1CFF0AA7C5F2

View File

@ -49,7 +49,7 @@ KNOWN_ERRORS = [
'raise_as': errors.BorgRepositoryDoesNotExistError,
},
{
'errors': ['passphrase supplied in .* is incorrect'],
'errors': ['[Pp]assphrase supplied in .* is incorrect'],
'message': _('Incorrect encryption passphrase'),
'raise_as': errors.BorgError,
},