Open dmudro opened 1 year ago
Hey @dmudro 👋
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.
Hey, I tried digging in the lib but I'm not sure I understand correctly. The retry mechanism happens only when using the retry middleware right? If I use wretch without anything else, I should have no retry when I'm calling my function?
The retry mechanism happens only when using the retry middleware right?
Hey, yes it is only when adding the retry middleware.
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?