Draco
Draco

Reputation: 16364

Neo4j Error - Failed to find an expected property (cypher) in the JSON at path data

I'm trying to connect to a remote Neo4j database using Neo4jClient (C#).

I get the following error when calling the "Connect" method on my Neo4jClient object instance:

System.InvalidOperationException: While trying to map some JSON into an object of type Neo4jClient.ApiModels.RootApiResponse, we failed to find an expected property (cypher) in the JSON at path data.

And this is how i'm creating the object and calling the method:

var dbClient = new GraphClient(myServerIpAddress, new HttpClientWrapper());
dbClient.Connect();

I can access the DB just fine using the browser. Any idea on what could be causing this issue?

Upvotes: 2

Views: 592

Answers (1)

Pat
Pat

Reputation: 409

According to the documentation, GraphClient's first parameter is always a Uri. I'm not sure what you're passing in myServerIpAddress, but it should be a Uri of the form http://hostname:port/db/data. I suggest your error is occurring because you're not supplying either the correct port (default for Neo4j is 7474) or the /db/data path?

Upvotes: 4

Related Questions