I'm receiving this error:
Error: lexical error: invalid char in json text. <!DOCTYPE html PUBLIC "-//W3C// (right here) ------^
The code uses an API to download series from the world bank. As the page sometimes fails, I think the problem appears there (sometimes the code runs perfect and other I receive that error, but in different moments).
I want to give the instruction that in case this error appear, wait for 30 second and try again (instead of stop running).
Any idea of how to do something like that would be much appreciated
Maia
I would use purrr's insistently()
Thanks a lot for the suggestion! I will try with that