David Chu commited on
Commit
db3eaa4
·
unverified ·
1 Parent(s): 5543da4

feat: show semantic scholar request errors

Browse files
Files changed (1) hide show
  1. main.py +1 -0
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):