Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function to check internet access before network calls #1672

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

dikwickley
Copy link

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:

image

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retriever should gracefully fail if there is no internet.
1 participant