activegraph icon indicating copy to clipboard operation
activegraph copied to clipboard

ActiveGraph::Core::SchemaErrors::CypherError exceptions unused

Open joshjordan opened this issue 3 years ago • 1 comments

When we experience e.g. a constraint validation failure, we're getting Neo4j::Driver::Exceptions::ClientException instead of the expected error class, ActiveGraph::Core::SchemaErrors::ConstraintValidationFailedError.

Upon digging deeper, it appears to me that the ActiveGraph::Core::SchemaErrors::CypherError family of exceptions are completely unused. The API to convert from Neo4j driver errors to ActiveGraph errors is present, but never called. The specs only test the ActiveGraph::Core::SchemaErrors::CypherError API as far as I can see, but not that the conversion ever actually takes place.

joshjordan avatar Dec 22 '20 22:12 joshjordan

@klobuczek I may be wrong about my assessment here. Let me know. In any case, I am happy to submit a PR to fix this if you can give me some guidance on where I should fix (base.rb? transaction.rb? transactions.rb?)

joshjordan avatar Dec 22 '20 22:12 joshjordan