CORE-3975: Fixed error message for invalid URLs.