error handling for invalid url or connectivity error