mirror of
https://github.com/YGGverse/Yoda.git
synced 2026-04-02 01:25:27 +00:00
delegate child errors to parent handler
This commit is contained in:
parent
e1592425b9
commit
f9e35553da
7 changed files with 11 additions and 12 deletions
|
|
@ -5,7 +5,7 @@ mod error;
|
|||
mod memory;
|
||||
|
||||
use database::Database;
|
||||
use error::Error;
|
||||
pub use error::Error;
|
||||
use memory::Memory;
|
||||
|
||||
use sqlite::{Connection, Transaction};
|
||||
|
|
@ -85,12 +85,11 @@ impl Auth {
|
|||
match self.database.records(None) {
|
||||
Ok(records) => {
|
||||
for record in records {
|
||||
if self
|
||||
if let Err(reason) = self
|
||||
.memory
|
||||
.add(record.url, record.profile_identity_gemini_id)
|
||||
.is_err()
|
||||
{
|
||||
return Err(Error::MemoryIndex);
|
||||
return Err(Error::Memory(reason));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue