tweak(labrinth): skip versions with unsupported loader fields on project-wide fields change (#4305)

This commit is contained in:
Alejandro González
2025-08-31 19:59:22 +02:00
committed by GitHub
parent 48e5319134
commit 15c31f04a3

View File

@@ -880,7 +880,7 @@ pub async fn project_edit(
) )
.await? .await?
{ {
super::versions::version_edit_helper( match super::versions::version_edit_helper(
req.clone(), req.clone(),
(VersionId::from(version.inner.id),), (VersionId::from(version.inner.id),),
pool.clone(), pool.clone(),
@@ -891,7 +891,16 @@ pub async fn project_edit(
}, },
session_queue.clone(), session_queue.clone(),
) )
.await?; .await
{
// An `InvalidInput` error being returned from this route when only
// editing the loader fields means that such fields are not valid for
// the loaders defined for this version, which is a common case for
// projects with heterogeneous loaders across versions and is best
// handled with opportunistic update semantics
Ok(_) | Err(ApiError::InvalidInput(_)) => continue,
err => return err,
}
} }
} }