Raise ValueError with a useful message if we can't find the settings object