err handling for transaction fail