Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Commit
•
f04a3dc
1
Parent(s):
4cc53b7
Add error handling to api_query_dataset function
Browse files
main.py
CHANGED
@@ -87,7 +87,7 @@ async def api_query_dataset(dataset_id: str, n: int = Query(default=10, ge=1, le
|
|
87 |
|
88 |
except Exception as e:
|
89 |
logger.error(f"Error querying dataset {dataset_id}: {str(e)}")
|
90 |
-
raise HTTPException(status_code=500, detail=str(e))
|
91 |
|
92 |
|
93 |
if __name__ == "__main__":
|
|
|
87 |
|
88 |
except Exception as e:
|
89 |
logger.error(f"Error querying dataset {dataset_id}: {str(e)}")
|
90 |
+
raise HTTPException(status_code=500, detail=str(e)) from e
|
91 |
|
92 |
|
93 |
if __name__ == "__main__":
|