From 07be48c240dd35bebfe9fd39097f4d6cbb7f34ff Mon Sep 17 00:00:00 2001 From: Takis Kakalis <80459599+Takaros999@users.noreply.github.com> Date: Thu, 28 May 2026 11:09:15 +0300 Subject: [PATCH 1/3] fix: handle identity attestation error --- rust/core/src/error.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rust/core/src/error.rs b/rust/core/src/error.rs index b4dd377e..281cddb3 100644 --- a/rust/core/src/error.rs +++ b/rust/core/src/error.rs @@ -197,6 +197,8 @@ impl AppError { "invalid_timestamp" => Self::InvalidTimestamp, "rp_signature_expired" => Self::RpSignatureExpired, "identity_attributes_not_matched" => Self::IdentityAttributesNotMatched, + // An early android version using this error code instead of `identity_attributes_not_matched` + "identity_attribute_mismatch" => Self::IdentityAttributesNotMatched, _ => Self::GenericError, } } From da97a2f054a84935634f00102054a79d7e761f40 Mon Sep 17 00:00:00 2001 From: Takis Kakalis <80459599+Takaros999@users.noreply.github.com> Date: Thu, 28 May 2026 11:32:56 +0300 Subject: [PATCH 2/3] fix --- rust/core/src/bridge.rs | 8 ++++++++ rust/core/src/error.rs | 2 ++ 2 files changed, 10 insertions(+) diff --git a/rust/core/src/bridge.rs b/rust/core/src/bridge.rs index 5d65a807..bf5ebb43 100644 --- a/rust/core/src/bridge.rs +++ b/rust/core/src/bridge.rs @@ -2631,6 +2631,14 @@ mod tests { ), ("invalid_timestamp", AppError::InvalidTimestamp), ("rp_signature_expired", AppError::RpSignatureExpired), + ( + "identity_attributes_not_matched", + AppError::IdentityAttributesNotMatched, + ), + ( + "identity_attribute_mismatch", + AppError::IdentityAttributesNotMatched, + ), ]; for (code, expected) in cases { diff --git a/rust/core/src/error.rs b/rust/core/src/error.rs index 281cddb3..c719f4ce 100644 --- a/rust/core/src/error.rs +++ b/rust/core/src/error.rs @@ -160,6 +160,8 @@ pub enum AppError { /// Identity attributes did not match the required values #[error("Identity attributes not matched")] + // An early android version using this error code instead of `identity_attributes_not_matched` + #[serde(alias = "identity_attribute_mismatch")] IdentityAttributesNotMatched, /// Generic error From cf8389f27c5a3bffb25e2d6c5a0a5dcac647ad03 Mon Sep 17 00:00:00 2001 From: Takis Kakalis <80459599+Takaros999@users.noreply.github.com> Date: Thu, 28 May 2026 11:35:41 +0300 Subject: [PATCH 3/3] clippy --- rust/core/src/error.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/rust/core/src/error.rs b/rust/core/src/error.rs index c719f4ce..76f82dcf 100644 --- a/rust/core/src/error.rs +++ b/rust/core/src/error.rs @@ -198,9 +198,10 @@ impl AppError { "timestamp_too_far_in_future" => Self::TimestampTooFarInFuture, "invalid_timestamp" => Self::InvalidTimestamp, "rp_signature_expired" => Self::RpSignatureExpired, - "identity_attributes_not_matched" => Self::IdentityAttributesNotMatched, // An early android version using this error code instead of `identity_attributes_not_matched` - "identity_attribute_mismatch" => Self::IdentityAttributesNotMatched, + "identity_attributes_not_matched" | "identity_attribute_mismatch" => { + Self::IdentityAttributesNotMatched + } _ => Self::GenericError, } }