summaryrefslogtreecommitdiffstats
path: root/combo/apps/search/models.py
diff options
context:
space:
mode:
Diffstat (limited to 'combo/apps/search/models.py')
-rw-r--r--combo/apps/search/models.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/combo/apps/search/models.py b/combo/apps/search/models.py
index f35e086..4859c4a 100644
--- a/combo/apps/search/models.py
+++ b/combo/apps/search/models.py
@@ -157,7 +157,13 @@ class SearchCell(CellBase):
kwargs['without_user'] = True
# don't send error traces on HTTP errors
kwargs['log_errors'] = 'warn'
- results = requests.get(url, **kwargs).json()
+
+ response = requests.get(url, **kwargs)
+ try:
+ results = response.json()
+ except ValueError:
+ return render_response(service)
+
if service.get('data_key'):
results['data'] = results.get(service['data_key']) or []
hit_templates = {}