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
been using wretch for some time, nice little lib indeed.
it might be worth tweaking the retry example or defaults to ignore certain http responses that should almost never retry.
we had a case with Zoom API recently where initial POST resulted in 400 Bad Request which retried a few times and subsequently causing 429 Too Many Requests. things like 400 bad request is almost always client's fault!
maybe adding a simple check in the doc or adding a new option / default?
...
retry({
...
// didn't try this yet:
until: (response, error) => response && (response.ok || ![408, 413, 500, 502, 503, 504].includes(response.status)),
// or a new option?
// retryOnAnyResponse: false,
retryOnNetworkError: false,
resolveWithLatestResponse: false
})
...
The text was updated successfully, but these errors were encountered:
been using wretch for some time, nice little lib indeed.
Thanks!
it might be worth tweaking the retry example or defaults to ignore certain http responses that should almost never retry.
You are absolutely right, this should be the default behaviour to skip retrying on 4xx errors. But until wretch v3.x.x is released (to avoid a breaking change) I just pushed a commit to clarify it in the readme and typescript doc.
been using wretch for some time, nice little lib indeed.
it might be worth tweaking the retry example or defaults to ignore certain http responses that should almost never retry.
we had a case with Zoom API recently where initial POST resulted in
400 Bad Request
which retried a few times and subsequently causing429 Too Many Requests
. things like 400 bad request is almost always client's fault!maybe adding a simple check in the doc or adding a new option / default?
The text was updated successfully, but these errors were encountered: