Skip to content

Fix and enhance Neo4j transaction handling in all instances #906

Description

@yuanzhou
  • Initialize tx = None before the try block
  • Add check tx is not None in the exception handler
  • Add a catch-all except Exception as e: clause for full coverage
  • Update the consumer methods to properly catch the new Exception if not already in place

Found 10 usage instances: https://github.com/search?q=repo%3Ahubmapconsortium%2Fentity-api%20tx.rollback()&type=code

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions