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

catch and handle errors in GitHub API queries #75

Open
elray1 opened this issue Sep 7, 2021 · 0 comments
Open

catch and handle errors in GitHub API queries #75

elray1 opened this issue Sep 7, 2021 · 0 comments
Assignees

Comments

@elray1
Copy link
Collaborator

elray1 commented Sep 7, 2021

I think we could insert a tryCatch here to catch errors with calling GitHub API and just return the last cached link date (maybe issuing a warning)

request <- httr::GET(
'https://api.github.com/repos/CSSEGISandData/COVID-19/commits',
query = list(path = query_base_file,
sort = "author-date",
page = as.character(page)))

the error we're trying to catch is Error in curl::curl_fetch_memory(url, handle = handle) : Timeout was reached: [api.github.com] LibreSSL SSL_read: SSL_ERROR_SYSCALL, errno 60

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

No branches or pull requests

2 participants