retriever
retriever copied to clipboard
Function to check internet access before network calls
This PR fixes: #1660 As the other PR for this issue has been stale for quite some time, this one attempts to handle the network availablity issue.
There is a utility function that terminates the program in case there is a network failure.
The function check_network()
has to be called at the top of all functions that are making a network call.
In case there is a network failure, it will give this response:
Originally if there was a network failure it would throw an error.
@henrykironde If this approach looks good enough, I can proceed with adding this function everywhere.