You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From what I can tell, retry_{limit,interval,errors} are only evaluated if the request is marked idempotent. As a user, this can lead to false confidence (because the request will not be retried).
I can draft a PR that uses Excon.display_warning in case these are set, but not idempotent.
The text was updated successfully, but these errors were encountered:
@fwolfst Thanks for reaching out. That feature request makes a lot of sense to me. There are some checks in place already for valid parameters too, so that also fits. Unfortunately, I think implementing it in a good way might be a little bit more involved than what it might seem at first glance (at least as things are currently implemented).
Idempotence is implemented via a middleware, which defaults to being utilized (though it gets skipped depending on configuration options). That said, it's possible for users to modify the middleware stack and remove the middleware if they wanted to. I'm not sure how likely it is in practice to do this, but if you knew idempotence wasn't going to be used, removing it would technically make things run slightly faster by skipping those code paths altogether.
So, the most straightforward fix might be for middlewares to somehow specify the parameters they recognized so that only the middlewares in current usage would be checked against. That said, as I think through this I wonder a bit if I should think about simplifying and streamlining some of the middleware stuff anyway (it's always been a challenge to work with).
Also, with all that said, I don't want perfect to be the enemy of the good. As an interim thing we could potentially just add some logic for the time being relating to the parameter checking that would first check to see if the idempotent middleware was in use and then check these other things. It's not as generic as the other options I described, but it's also much more approachable and simple until I have a chance to think about doing some of the more involved fixes.
Does that all make sense? What do you think about the options?
From what I can tell,
retry_{limit,interval,errors}
are only evaluated if the request is markedidempotent
. As a user, this can lead to false confidence (because the request will not be retried).I can draft a PR that uses
Excon.display_warning
in case these are set, but not idempotent.The text was updated successfully, but these errors were encountered: