retry: Retry function

View source: R/retry.R

retryR Documentation

Retry function

Description

Internal function for handling errors when accessing APIs

Usage

retry(
  expr,
  isError = function(x) "try-error" %in% class(x),
  maxErrors = 5,
  sleep = 0
)

Arguments

expr

This is the function you want to catch and handle errors from

isError

Function for evaluating if provided expression is throwing an error

maxErrors

The maximum number of errrors it should handle from the function

sleep

The amount of sleep between a caught error and the next attempt

Value

The expression that has been either successfully ran or retried maximum number of times


LucaAnholt/PanViz documentation built on April 17, 2022, 7:28 a.m.