transaction: Fix a crash in an error path
transaction: Fix a crash in an error path

This was found while writing transaction tests.
We were passing error, but trying to use the local_error
message.

Closes: #2198
Approved by: alexlarsson

matthiasclasen/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,matthiasclasen/flatpak,flatpak/flatpak,matthiasclasen/flatpak,flatpak/flatpak,flatpak/flatpak,flatpak/flatpak,flatpak/flatpak