REQ-3045: 添加必要的日志

This commit is contained in:
yanglin 2024-10-28 11:02:20 +08:00
parent adf32b3db5
commit 9ec7b844d6

View File

@ -33,7 +33,7 @@ public class ModelVersion {
public static ModelVersion of(Integer version) {
// attack?
if (version != null && (version > MAX_VERSION_NUMBER || version < MIN_VERSION_NUMBER))
throw new ServiceException("model version is too large");
throw new ServiceException(String.format("model version is invalid, version=%d", version));
if (version == null) version = MIN_VERSION_NUMBER;
return VERSIONS.computeIfAbsent(version, ModelVersion::new);
}