[deviantart] handle decode errors for extended_fetch results (#655)

This isn't going to solve the underlying problem, but it should at
least provide the server response when those errors happen.
pull/658/head
Mike Fährmann 5 years ago
parent 88ebbadc58
commit 1b82d36ab2
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -1044,7 +1044,10 @@ class DeviantartAPI():
if response.status_code == 404:
raise exception.StopExtraction(
"Your account must use the Eclipse interface.")
return response.json()
try:
return response.json()
except Exception:
return {"error": response.text}
def deviation_metadata(self, deviations):
""" Fetch deviation metadata for a set of deviations"""

Loading…
Cancel
Save