neo4j-rstats / neo4r

A Modern and Flexible Neo4J Driver
https://neo4j-rstats.github.io/user-guide/
Other
106 stars 29 forks source link

call_api(..., type = 'graph') to graph with no data returns a misleading error #39

Closed dfgitn4j closed 5 years ago

dfgitn4j commented 5 years ago

Would hope that the call would recognize that there's no data and return a message indicating that the query returned no data. For example:

x<-"call apoc.meta.graph" %>% call_api(con, type = 'graph')
Your call can't be converted to a graph.
Please switch to type = "row".

switching to row will return nothing.

ColinFay commented 5 years ago

I've updated the message so it's now :

No graph data found.
Either your call can't be converted to a graph 
or there is no data at all matching your call.
Verify your call or try type = "row".

Does it sound clearer to you or would you prefer something else?

dfgitn4j commented 5 years ago

Good wording - identifies the two causes and proposes an alternative for understanding the underlying root cause. Thank you.

I've updated the message so it's now :

No graph data found.
Either your call can't be converted to a graph 
or there is no data at all matching your call.
Verify your call or try type = "row".

Does it sound clearer to you or would you prefer something else?