David Chu
commited on
feat: show semantic scholar request errors
Browse files
main.py
CHANGED
@@ -68,6 +68,7 @@ def semantic_scholar(query: str, top_k: int = 10) -> list[Article]:
|
|
68 |
"minCitationCount": 20,
|
69 |
},
|
70 |
)
|
|
|
71 |
results = resp.json()
|
72 |
articles = []
|
73 |
for i, article in enumerate(results.get("data", []), 1):
|
|
|
68 |
"minCitationCount": 20,
|
69 |
},
|
70 |
)
|
71 |
+
resp.raise_for_status()
|
72 |
results = resp.json()
|
73 |
articles = []
|
74 |
for i, article in enumerate(results.get("data", []), 1):
|