Currently, the transactional middleware does not handle exceptions coming from the application (or from wrapped middleware). That causes transactions to be committed when an exception occurs. The transactional middleware was only designed to react to HTTP status being 4xx or 5xx, but status isn't available when an exception is raised.
Pushed in feature/92-rollback and awaiting approval. Still needs a dedicated test for this problem.
Test written and merged in changeset d70ae7d.