refactor(logging): replace log_err! with structured logging_error! calls

refactor(cm-service): better error handling from Backend to Frontend
This commit is contained in:
Tunglies
2025-03-28 03:39:21 +08:00
parent 59caa22431
commit e8e16f7d57
18 changed files with 232 additions and 128 deletions

View File

@@ -1,8 +1,8 @@
use crate::{
config::{Config, IVerge},
core::backup,
log_err,
utils::dirs::app_home_dir,
logging_error,
utils::{dirs::app_home_dir, logging::Type},
};
use anyhow::Result;
use reqwest_dav::list_cmd::ListFile;
@@ -69,8 +69,9 @@ pub async fn restore_webdav_backup(filename: String) -> Result<()> {
// extract zip file
let mut zip = zip::ZipArchive::new(fs::File::open(backup_storage_path.clone())?)?;
zip.extract(app_home_dir()?)?;
log_err!(
logging_error!(
Type::Backup,
true,
super::patch_verge(
IVerge {
webdav_url,