Handle failed/cancelled transactions (bug 987843)