Move the retry logic when site_name is passed in a NULL or "" to the wrapper function.