Spaces:
Sleeping
Sleeping
Update backend/main.py
Browse files- backend/main.py +2 -2
backend/main.py
CHANGED
|
@@ -408,10 +408,10 @@ async def analyze(files: List[UploadFile] = File(...)):
|
|
| 408 |
|
| 409 |
# Extract each paper
|
| 410 |
for path, name in zip(tmp_paths, paper_names):
|
| 411 |
-
|
| 412 |
result = extract_protocol(client, path, name)
|
| 413 |
extracted.append(result)
|
| 414 |
-
|
| 415 |
raise HTTPException(
|
| 416 |
status_code=500,
|
| 417 |
detail=f"Failed to process {name}: {str(e)}"
|
|
|
|
| 408 |
|
| 409 |
# Extract each paper
|
| 410 |
for path, name in zip(tmp_paths, paper_names):
|
| 411 |
+
try:
|
| 412 |
result = extract_protocol(client, path, name)
|
| 413 |
extracted.append(result)
|
| 414 |
+
except Exception as e:
|
| 415 |
raise HTTPException(
|
| 416 |
status_code=500,
|
| 417 |
detail=f"Failed to process {name}: {str(e)}"
|