fix: correct error handling in transaction rollback
Update error handling logic in the rollback function to accurately check for transaction completion. The condition now verifies the rollback error instead of the original error, ensuring proper logging and behavior when the transaction is already done.