feat(server): log error when fails to load config

This commit is contained in:
Paul Campbell 2024-04-07 18:37:01 +01:00
parent dc4110596f
commit ef75ecda08

View file

@ -2,7 +2,7 @@ mod config;
use std::path::PathBuf;
use tracing::info;
use tracing::{error, info};
use crate::filesystem::FileSystem;
@ -30,7 +30,14 @@ pub fn start(fs: FileSystem) {
return;
};
info!("Starting Server...");
let _config = config::Config::load(&fs);
let config = match config::Config::load(&fs) {
Ok(config) => config,
Err(err) => {
error!("Failed to load config file. Error: {}", err);
return;
}
};
info!("Config loaded");
// todo!()
}