refactor: deduplicate ItemInfo, improve error handling, fix pre-existing bugs
- Move ItemInfo to services/types.rs for sharing between client and server - Replace .expect() in compression_service with proper error handling - Add CoreError::PayloadTooLarge variant for semantic error handling - Export CoreError from lib.rs for library users - Unify get_item_meta_name/value to take &str instead of String - Extract item_path() helper in ItemService to reduce duplication - Add warning logs for silent errors in list.rs - Fix pre-existing borrow errors: tx moved in export handler, item_with_meta partial move in TryFrom implementation - Fix unused data_dir variables in server code
This commit is contained in:
@@ -61,6 +61,9 @@ lazy_static! {
|
||||
static ref KEEP_META_RE: Regex = Regex::new(r"^KEEP_META_(.+)$").unwrap();
|
||||
}
|
||||
|
||||
pub const IMPORT_FORMAT_ERROR: &str =
|
||||
"Unsupported import format: {} (expected .keep.tar or .meta.yml)";
|
||||
|
||||
pub fn get_meta_from_env() -> HashMap<String, String> {
|
||||
debug!("COMMON: Getting meta from KEEP_META_*");
|
||||
let mut meta_env: HashMap<String, String> = HashMap::new();
|
||||
|
||||
Reference in New Issue
Block a user