fix(workflow): move file URL retrieval into try block to allow exceptions

This commit is contained in:
Eternity
2026-02-06 16:59:51 +08:00
parent c05d95924f
commit e253fba2e9
2 changed files with 25 additions and 32 deletions

View File

@@ -40,10 +40,7 @@ class FileInput(BaseModel):
@classmethod
def validate_type(cls, v):
"""验证文件类型"""
try:
return FileType.trans(v)
except ValueError:
raise ValueError(f"无效的文件类型: {v}")
return FileType.trans(v)
@field_validator("upload_file_id")
@classmethod