better error and transaction interaction