extracted "No options provided" error as a common function