esabora: fix catching of json errors (#72572)
This commit is contained in:
parent
64ef32a922
commit
db49dab374
|
@ -1,3 +1,4 @@
|
|||
import json
|
||||
import urllib.parse
|
||||
|
||||
import requests
|
||||
|
@ -85,7 +86,7 @@ class Esabora(BaseResource, HTTPResource):
|
|||
)
|
||||
try:
|
||||
data = response.json()
|
||||
except requests.JSONDecodeError as e:
|
||||
except json.JSONDecodeError as e:
|
||||
raise APIError(
|
||||
'Esabora platform "%s" invalid JSON response: %s' % (self.service_url, exception_to_text(e)),
|
||||
log_error=True,
|
||||
|
|
Loading…
Reference in New Issue