From b7900489b0431b44360f9d66f99bf6523ebe8e6c Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 20 Nov 2024 10:06:22 +0200 Subject: [PATCH] handle error details --- src/profile/identity/gemini/auth.rs | 4 ++-- src/profile/identity/gemini/auth/error.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/profile/identity/gemini/auth.rs b/src/profile/identity/gemini/auth.rs index 0c217b39..d4bffd72 100644 --- a/src/profile/identity/gemini/auth.rs +++ b/src/profile/identity/gemini/auth.rs @@ -71,7 +71,7 @@ impl Auth { // Done Ok(profile_identity_gemini_auth_id) } - Err(_) => return Err(Error::DatabaseRecordsRead(url.to_string())), + Err(reason) => return Err(Error::DatabaseRecordsRead(url.to_string(), reason)), } } @@ -92,7 +92,7 @@ impl Auth { } } } - Err(_) => return Err(Error::DatabaseIndex), + Err(reason) => return Err(Error::DatabaseIndex(reason)), } Ok(()) } diff --git a/src/profile/identity/gemini/auth/error.rs b/src/profile/identity/gemini/auth/error.rs index 9368c635..a305e8a8 100644 --- a/src/profile/identity/gemini/auth/error.rs +++ b/src/profile/identity/gemini/auth/error.rs @@ -1,8 +1,8 @@ #[derive(Debug)] pub enum Error { - DatabaseIndex, + DatabaseIndex(sqlite::Error), DatabaseRecordCreate(i64, String, sqlite::Error), DatabaseRecordDelete(i64, sqlite::Error), - DatabaseRecordsRead(String), + DatabaseRecordsRead(String, sqlite::Error), MemoryIndex(super::memory::Error), }