Validate url and returning errors