handle malformed responses passively
This commit is contained in:
@@ -453,6 +453,8 @@ class Source(models.Model):
|
|||||||
if not callable(indexer):
|
if not callable(indexer):
|
||||||
raise Exception(f'Source type f"{self.source_type}" has no indexer')
|
raise Exception(f'Source type f"{self.source_type}" has no indexer')
|
||||||
response = indexer(self.index_url)
|
response = indexer(self.index_url)
|
||||||
|
if not isinstance(response, dict):
|
||||||
|
return []
|
||||||
return response.get('entries', [])
|
return response.get('entries', [])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user