Skip to content

Commit

Permalink
Improve Error Messaging for APOC Procedure Failure in Neo4jGraph (lan…
Browse files Browse the repository at this point in the history
…gchain-ai#5547)

## Improve Error Messaging for APOC Procedure Failure in Neo4jGraph

This commit revises the error message provided when the
'apoc.meta.data()' procedure fails. Previously, the message simply
instructed the user to install the APOC plugin in Neo4j. The new error
message is more specific.

Also removed an unnecessary newline in the Cypher statement variable:
`node_properties_query`.

Fixes langchain-ai#5545 

## Who can review?
  - @vowelparrot
  - @dev2049
  • Loading branch information
guangchen811 authored and Undertone0809 committed Jun 19, 2023
1 parent 3551344 commit a1f7141
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion langchain/graphs/neo4j_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ def __init__(
except neo4j.exceptions.ClientError:
raise ValueError(
"Could not use APOC procedures. "
"Please install the APOC plugin in Neo4j."
"Please ensure the APOC plugin is installed in Neo4j and that "
"'apoc.meta.data()' is allowed in Neo4j configuration "
)

@property
Expand Down

0 comments on commit a1f7141

Please sign in to comment.