diff --git a/src/profile/identity/gemini.rs b/src/profile/identity/gemini.rs index fec3d136..a08f8802 100644 --- a/src/profile/identity/gemini.rs +++ b/src/profile/identity/gemini.rs @@ -96,8 +96,8 @@ impl Gemini { match self.database.records() { Ok(records) => { for record in records { - if self.memory.add(record.id, record.pem).is_err() { - return Err(Error::MemoryIndex(record.id)); + if let Err(reason) = self.memory.add(record.id, record.pem) { + return Err(Error::MemoryIndex(reason)); } } } diff --git a/src/profile/identity/gemini/error.rs b/src/profile/identity/gemini/error.rs index 2030e33f..255114a6 100644 --- a/src/profile/identity/gemini/error.rs +++ b/src/profile/identity/gemini/error.rs @@ -4,6 +4,6 @@ pub enum Error { DatabaseIndex(sqlite::Error), DatabaseRecordCreate(sqlite::Error), MemoryClear(super::memory::Error), - MemoryIndex(i64), + MemoryIndex(super::memory::Error), Certificate(Box), }