Skip to content

Conversation

@asieira
Copy link
Contributor

@asieira asieira commented Mar 4, 2017

Based on #404 and some
observations of my own I humbly submit this pull request that adds two
new arguments to RETRY.

safe_statuses is an integer vector of HTTP status codes that should
not trigger a retry, overruling the result of a call to http_error.

use_try is meant to handle the cases where curl signals an error
(i.e., with stop) for transient situations such as a DNS lookup
failure or a connection error. If use_try is set to TRUE then RETRY
will call try(request_perform(..)) and retry the operation if an
error is signaled.

Both parameters have sensible default values so that this change
doesn’t introduce breaking changes and RETRY behaves as it did before
if they are not overridden.

Based on #404 and some
observations of my own I humbly submit this pull request that adds two
new arguments to `RETRY`.

`safe_statuses` is an integer vector of HTTP status codes that should
not trigger a retry, overruling the result of a call to `http_error`.

`use_try` is meant to handle the cases where curl signals an error
(i.e., with `stop`) for transient situations such as a DNS lookup
failure or a connection error. If this is set to `TRUE` then `RETRY`
will call `try(request_perform(..))` and retry the operation if an
error is signaled.

Both parameters have sensible default values so that this change
doesn’t introduce breaking changes and RETRY behaves as it did before
if they are not overridden.
@hadley
Copy link
Member

hadley commented Jul 24, 2017

Let's discuss the API in the issue first.

@hadley hadley closed this Jul 24, 2017
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

Successfully merging this pull request may close these issues.

2 participants