From 3896babbe2f0e873973ebd499b23ab7297aa95f0 Mon Sep 17 00:00:00 2001 From: SimonThormeyer Date: Wed, 27 Nov 2024 14:11:20 +0100 Subject: [PATCH] fix: don't obfuscate rexie error in keystore v1.0.0 --- .../wasm/migrations/keystore_v_1_0_0/error.rs | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/keystore/src/connection/platform/wasm/migrations/keystore_v_1_0_0/error.rs b/keystore/src/connection/platform/wasm/migrations/keystore_v_1_0_0/error.rs index 0c512e0f08..2d18aac188 100644 --- a/keystore/src/connection/platform/wasm/migrations/keystore_v_1_0_0/error.rs +++ b/keystore/src/connection/platform/wasm/migrations/keystore_v_1_0_0/error.rs @@ -95,8 +95,9 @@ pub enum CryptoKeystoreError { #[error("The task has been canceled")] WasmExecutorError, #[cfg(target_family = "wasm")] - #[error("{0}")] - RexieError(String), + #[error(transparent)] + /// Rexie Error + RexieError(#[from] rexie::Error), #[cfg(target_family = "wasm")] #[error("An IndexedDB timeout has occured")] RexieTimeoutError, @@ -176,13 +177,6 @@ impl From for CryptoKeystoreError { } } -#[cfg(target_family = "wasm")] -impl From for CryptoKeystoreError { - fn from(rexie_err: rexie::Error) -> Self { - Self::RexieError(rexie_err.to_string()) - } -} - #[cfg(feature = "proteus-keystore")] impl proteus_traits::ProteusErrorCode for CryptoKeystoreError { fn code(&self) -> proteus_traits::ProteusErrorKind {