1
0
mirror of https://github.com/bitwarden/mobile synced 2026-01-09 20:13:18 +00:00

[PM-5731] feat: add unknown error handling

This commit is contained in:
Andreas Coroiu
2024-01-26 10:44:39 +01:00
parent c90ed74faa
commit 8be604feac
2 changed files with 35 additions and 17 deletions

View File

@@ -83,9 +83,14 @@ namespace Bit.Core.Services
var reencrypted = await _cipherService.EncryptAsync(cipher);
await _cipherService.SaveWithServerAsync(reencrypted);
credentialId = fido2Credential.CredentialId;
} catch {
} catch (NotAllowedError) {
throw;
// throw new NotImplementedException();
} catch (Exception e) {
_logService.Error(
$"[Fido2Authenticator] Unknown error occured during attestation: {e.Message}"
);
throw new UnknownError();
}
return new Fido2AuthenticatorMakeCredentialResult
@@ -182,9 +187,9 @@ namespace Bit.Core.Services
AuthenticatorData = authenticatorData,
Signature = signature
};
} catch {
_logService.Info(
"[Fido2Authenticator] Aborting because no matching credentials were found in the vault."
} catch (Exception e) {
_logService.Error(
$"[Fido2Authenticator] Unknown error occured during assertion: {e.Message}"
);
throw new UnknownError();