Skip to content

Conversation

@danielmbarlow
Copy link

@danielmbarlow danielmbarlow commented Sep 23, 2024

When using the suggested code from the documentation:

# For the `neo4j` gem
config.around do |example|
  ActiveGraph::Base.transaction do |tx|
    example.run
    tx.failure
  end
end

We get this error:

NoMethodError:
       undefined method `failure' for an instance of Neo4j::Driver::Internal::InternalTransaction

The syntax is apparently now tx.rollback, however when the transaction has already been rolled back we get this error

     Neo4j::Driver::Exceptions::ClientException:
       Can't rollback, transaction has been rolled back

This pull request changes the documention to recommend:

  • Usage of the new syntax for rollback
  • A check to see if the transaction is open before rolling it back

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.

1 participant