Skip to content

Commit fbb6f9a

Browse files
committed
fix(mod_versions): log errors on create_version
1 parent ef53c35 commit fbb6f9a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/endpoints/mod_versions.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,10 @@ pub async fn create_version(
269269

270270
let mut file_path = download_geode_file(&download_link).await?;
271271
let json = ModJson::from_zip(&mut file_path, &download_link, dev.verified)
272-
.or(Err(ApiError::FilesystemError))?;
272+
.map_err(|err| {
273+
log::error!("Failed to parse mod.json: {}", err);
274+
ApiError::FilesystemError
275+
})?;
273276
if json.id != path.id {
274277
return Err(ApiError::BadRequest(format!(
275278
"Request id {} does not match mod.json id {}",

0 commit comments

Comments
 (0)