mirror of
https://github.com/YGGverse/Yoda.git
synced 2025-01-15 17:20:08 +00:00
handle error details
This commit is contained in:
parent
b7900489b0
commit
fa9c2b4fbc
@ -80,7 +80,7 @@ impl Gemini {
|
|||||||
self.index()?;
|
self.index()?;
|
||||||
Ok(profile_identity_gemini_id)
|
Ok(profile_identity_gemini_id)
|
||||||
}
|
}
|
||||||
Err(_) => Err(Error::DatabaseRecordCreate),
|
Err(reason) => Err(Error::DatabaseRecordCreate(reason)),
|
||||||
},
|
},
|
||||||
Err(reason) => Err(Error::Certificate(reason)),
|
Err(reason) => Err(Error::Certificate(reason)),
|
||||||
}
|
}
|
||||||
@ -96,11 +96,11 @@ impl Gemini {
|
|||||||
Ok(records) => {
|
Ok(records) => {
|
||||||
for record in records {
|
for record in records {
|
||||||
if self.memory.add(record.id, record.pem).is_err() {
|
if self.memory.add(record.id, record.pem).is_err() {
|
||||||
return Err(Error::MemoryIndex); // @TODO
|
return Err(Error::MemoryIndex(record.id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Err(_) => return Err(Error::DatabaseIndex), // @TODO
|
Err(reason) => return Err(Error::DatabaseIndex(reason)),
|
||||||
};
|
};
|
||||||
Ok(()) // @TODO
|
Ok(()) // @TODO
|
||||||
}
|
}
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub enum Error {
|
pub enum Error {
|
||||||
AuthInit(super::auth::Error),
|
AuthInit(super::auth::Error),
|
||||||
DatabaseIndex,
|
DatabaseIndex(sqlite::Error),
|
||||||
DatabaseRecordCreate,
|
DatabaseRecordCreate(sqlite::Error),
|
||||||
MemoryIndex,
|
MemoryIndex(i64),
|
||||||
Certificate(Box<dyn std::error::Error>),
|
Certificate(Box<dyn std::error::Error>),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user