0

I'm trying to get a HTML code using httr and RCurl using proxies. The process is using a loop, and so every now and then I get the error message

Error in curl::curl_fetch_memory(url, handle = handle) : Couldn't connect to server

What I would like is to add a condition on this type of error, so that the running of the code won't stop everytime this happens.

1

1 Answer 1

0

I have managed to solve this problem using tryCatch and a while loop. As long as the function didn't return a specific value, I keep the while loop running. Explanation on how to use tryCatch I've found here.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.