Skip to content

Commit

Permalink
fix(mod_versions): log errors on create_version
Browse files Browse the repository at this point in the history
  • Loading branch information
Fleeym committed Nov 14, 2024
1 parent ef53c35 commit fbb6f9a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/endpoints/mod_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 {}",
Expand Down

0 comments on commit fbb6f9a

Please sign in to comment.