r.json() doesn't throw simplejson error any more

This commit is contained in:
Edward Betts 2023-12-04 21:26:09 +00:00
parent b671843aea
commit e8c60e9f9b

View file

@ -4,7 +4,6 @@ import typing
import urllib.parse
import requests
import simplejson.errors
from flask import render_template
from . import headers
@ -86,7 +85,7 @@ def wdqs(query: str) -> list[Row]:
try:
return typing.cast(list[Row], r.json()["results"]["bindings"])
except simplejson.errors.JSONDecodeError:
except requests.exceptions.JSONDecodeError:
raise QueryError(query, r)