Adds error checking in case of bad provider url