Catch error response decoding json in search connector

This commit is contained in:
Mouse Reeve
2020-12-30 09:11:00 -08:00
parent 26c0880fe4
commit 21f67c9e28
2 changed files with 6 additions and 2 deletions

View File

@ -46,7 +46,10 @@ class AbstractMinimalConnector(ABC):
)
if not resp.ok:
resp.raise_for_status()
data = resp.json()
try:
data = resp.json()
except ValueError as e:
raise ConnectorException('Unable to parse json response', e)
results = []
for doc in self.parse_search_data(data)[:10]: