Add try/catch validation handling for doPublish()