Error handling with rollback
Initial outline for tests