summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fatcat_scholar/search.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/fatcat_scholar/search.py b/fatcat_scholar/search.py
index 5a4d47f..b57a16d 100644
--- a/fatcat_scholar/search.py
+++ b/fatcat_scholar/search.py
@@ -314,8 +314,9 @@ def do_fulltext_search(
query_start = datetime.datetime.now()
try:
resp = search.execute()
- except elasticsearch.exceptions.RequestError as e:
+ except elasticsearch.exceptions.RequestError as e_raw:
# this is a "user" error
+ e: Any = e_raw
logging.warn("elasticsearch 400: " + str(e.info))
if e.info.get("error", {}).get("root_cause", {}):
raise ValueError(str(e.info["error"]["root_cause"][0].get("reason"))) from e