Catch error response decoding json in search connector
This commit is contained in:
parent
26c0880fe4
commit
21f67c9e28
2 changed files with 6 additions and 2 deletions
|
@ -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]:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue