wdq
wdq copied to clipboard
Catch and report API timeout
For some queries the server timeouts, but wdq
dies with rather obscure message about failure to parse JSON. Failcase:
SELECT ?item ?smiles ?itemLabel
WHERE { ?item wdt:P31 wd:Q11173 .
?item wdt:P233 ?smiles .
SERVICE wikibase:label { bd:serviceParam wikibase:language "en". } }
It would be great if wdq
could check for the HTTP return status (I believe server-side timeouts should set a proper one) and report it back to the user.