Skip to content

Fix and enhance Neo4j transaction handling in all instances #906

@yuanzhou

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

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

Status

Ready

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions