Page MenuHomePhabricator

Empty map results give an error
Closed, ResolvedPublic5 Estimated Story Points

Description

Both of these queries show unhelpful errors instead of a helpful warning message like "no data was found". Also, looking at the code, there seems to be no way for the visualizer to show a custom error message in the error band above visualizer.

Returns a single empty object

#defaultView:Map
SELECT ?place ?placeLabel ?location
WHERE {}
{
  "head" : {    "vars" : [ "place", "placeLabel", "location" ]  },
  "results" : {    "bindings" : [ { } ]  }
}

Returns empty response

#defaultView:Map
SELECT ?place ?placeLabel ?location
WHERE { wd:Q0 wdt:P0 ?location  . }
{
  "head" : {    "vars" : [ "place", "placeLabel", "location" ]  },
  "results" : {    "bindings" : [ ]  }
}

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Jonas raised the priority of this task from Medium to High.Dec 4 2017, 10:31 AM
Jonas moved this task from Backlog to Bugs on the Wikidata Query UI board.

Change 462414 had a related patch set uploaded (by Jonas Kress (WMDE); owner: Jonas Kress (WMDE)):
[wikidata/query/gui@master] Fix: Empty map results give an error

https://gerrit.wikimedia.org/r/462414

Change 462414 merged by jenkins-bot:
[wikidata/query/gui@master] Fix: Empty map results give an error

https://gerrit.wikimedia.org/r/462414