From d95fa771f5c9a75dece2038ee50619a53f9c43f7 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Sat, 29 Dec 2018 00:07:14 -0800 Subject: check request status codes idiomatically --- python/fatcat_web/search.py | 1 + 1 file changed, 1 insertion(+) (limited to 'python/fatcat_web') diff --git a/python/fatcat_web/search.py b/python/fatcat_web/search.py index 471e522a..5cebfde4 100644 --- a/python/fatcat_web/search.py +++ b/python/fatcat_web/search.py @@ -36,6 +36,7 @@ def do_search(q, limit=50, fulltext_only=True): (app.config['ELASTICSEARCH_BACKEND'], app.config['ELASTICSEARCH_INDEX']), json=search_request) + #rv.raise_for_status() if resp.status_code != 200: print("elasticsearch non-200 status code: " + str(resp.status_code)) print(resp.content) -- cgit v1.2.3