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

update_packages() intermittently fails with cryptic error when GitHub servers have problems #494

Closed
jonathan-g opened this issue Apr 21, 2020 · 1 comment

Comments

@jonathan-g
Copy link

jonathan-g commented Apr 21, 2020

I can't create a reprex because this depends on how GitHub responds to requests, but this morning, I was getting a lot of unicorns on GitHub in my browser and at the same time update_packages() (run interactively from the RStudio console) was intermittently throwing errors

Error: JSON: EXPECTED value GOT <

It took me a while to figure out what might be doing this, and I am still not certain, but my suspicion is that when update_packages() queries GitHub and then gets an error code (e.g., 503) with an HTML payload instead of the expected 200 code and a JSON payload, the JSON parser fails.

Maybe this could be addressed by inspecting the return code and throwing a more user-friendly error message if the https request returns an error code.

@jonathan-g jonathan-g changed the title update_packages() fails with cryptic error if GitHub returns 503 update_packages() intermittently fails with cryptic error when GitHub servers have problems Apr 21, 2020
@jimhester
Copy link
Member

Yes, that is what is happening it is a known issue. as such I am going to close this particular issue.

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