Handle invalid urls