refs.c: update ref_transaction_delete to check for error and return status