This is probably a noob question, but how do I make my response throw an exception if the user does not have an internet connection or if it takes too long to fetch the data
You don't need to use http to check the connectivity yourself, simply use connectivity library