handle publish arguments with better errors