neo4j / neo4j-go-driver

Neo4j Bolt Driver for Go
Apache License 2.0
485 stars 68 forks source link

Update error message when attempting to connect to HTTP server #517

Closed StephenCathcart closed 1 year ago

StephenCathcart commented 1 year ago

The driver already throws an appropriate error when the server returns HTTP. This PR makes the error message more explicit to help with debugging.

2023-07-20 09:15:50.355459 Response: {"data":{"code":"","errorType":"server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)","id":"2","msg":"server responded HTTP. Make sure you are not trying to connect to the http endpoint (HTTP defaults to port 7474 whereas BOLT defaults to port 7687)"},"name":"DriverError"}
StephenCathcart commented 1 year ago

[Go] Check for HTTP response on bolt connections with both bolt:// and neo4j:// schema.