Skip to content

Conversation

JuliaKovtun
Copy link
Contributor

ResultSingleOptional testkit request implementation (#245)

result = fetch(result_id)
record = begin
{ values: result.single.values.map(&method(:to_testkit)) }
rescue Neo4j::Driver::Exceptions::NoSuchRecordException
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using exception for control flow is not a good practice. The same can be achieved without raising and rescuing an exception by reading 2 records.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants