From fbb6f9abb21184323d57e0953a82ecdc1fd946b1 Mon Sep 17 00:00:00 2001 From: Fleeym <61891787+Fleeym@users.noreply.github.com> Date: Thu, 14 Nov 2024 17:17:11 +0200 Subject: [PATCH] fix(mod_versions): log errors on create_version --- src/endpoints/mod_versions.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/endpoints/mod_versions.rs b/src/endpoints/mod_versions.rs index 834ff34..c72b1ab 100644 --- a/src/endpoints/mod_versions.rs +++ b/src/endpoints/mod_versions.rs @@ -269,7 +269,10 @@ pub async fn create_version( let mut file_path = download_geode_file(&download_link).await?; let json = ModJson::from_zip(&mut file_path, &download_link, dev.verified) - .or(Err(ApiError::FilesystemError))?; + .map_err(|err| { + log::error!("Failed to parse mod.json: {}", err); + ApiError::FilesystemError + })?; if json.id != path.id { return Err(ApiError::BadRequest(format!( "Request id {} does not match mod.json id {}",