-
Notifications
You must be signed in to change notification settings - Fork 117
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
Would it make sense to make retry transient?
function public?
#371
Comments
transient?
function public?
This is very arbitrary but I'd like to keep Req.Steps to just have steps functions as it's already pretty big module. The downside is we can't have this function which I agree would be very convenient to have. Perhaps there is another way to solve this? |
I had a look at The Req.new(
...,
retry: fn
_req, %Req.Response{status: 403} ->
# Hypothetical service that returns HTTP 403 instead of 429 for "Too Many Requests"
{:delay, 30_000}
_req, _resp ->
{:retry, :safe_transient}
end
) |
@wojtekmach how does the proposal sound? Is this something I could start working on that the Req library would be happy to accept? |
Sorry I'm still considering it. |
I'm thinking that it would be nice to have the ability to define your own
retry
function, and in theretry
function if the conditions that I care about don't match, default toreq/lib/req/steps.ex
Line 2292 in 85bd743
I'll be happy to make a PR if this sounds reasonable.
The text was updated successfully, but these errors were encountered: