refs.c: change ref_transaction_create to do error checking and return status