delegate child errors to parent handler

This commit is contained in:
yggverse 2024-11-20 09:27:40 +02:00
parent e1592425b9
commit f9e35553da
7 changed files with 11 additions and 12 deletions

View file

@ -6,7 +6,7 @@ mod memory;
use auth::Auth;
use database::Database;
use error::Error;
pub use error::Error;
use memory::Memory;
@ -34,7 +34,7 @@ impl Gemini {
// Init components
let auth = match Auth::new(connection.clone()) {
Ok(auth) => Rc::new(auth),
Err(_) => return Err(Error::AuthInit), // @TODO
Err(reason) => return Err(Error::AuthInit(reason)), // @TODO
};
let database = Rc::new(Database::new(connection, profile_identity_id.clone()));
let memory = Rc::new(Memory::new());