Improve error output with transaction issues

Description

It would be better for debugging purposes to display the current transaction state for debugging reasons. I'm preparing a PR:

Environment

None

Assignee

Unassigned

Reporter

Niko Wittenbeck

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

Components

Affects versions

Priority

Minor
Configure