Properly handle Neo4j query errors.