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
retry not working with POST (with OPTIONS preflight) and 401 statuscode #230
Comments
Ah, some debugging in the node_modules/ky/index.js reveals:
|
I think we have to do the |
Hm, now it is |
This thrown by these lines:
|
So for me it seems POST is not suppported right now. |
Hi @DanielRuf, thanks for the bug report. Your use case is officially supported, however We need to fix Ky by calling Until such a fix is released, if this feature is important to you, you may want to stay on |
Duplicate of #217 |
We've migrated to simple get requests and moved the body to custom headers which works without any issues as this issue is a blocker for us. |
You mentioned seeing Retries should still work with any request that does not have a body, including |
You are using Firefox whereas they are using Chrome, so the message is slightly different... sorry it's not standardized. 😄
vs
These messages are for the same error condition, here's a minimal repro that you can run in the console of both browsers to prove it: const req = new Request('/foo', { method : 'POST', body : 'foo' });
fetch(req);
fetch(req); I just submitted a fix for this in PR #231. You can try using that branch and check that it does indeed work for your use case (you'll have to load the dependency from GitHub, which you can do with npm or by |
Ah, thanks for the clarification. That makes sense now =) Or people can try it with |
We have the following retry options:
I generate a 401 error from the backend and I see it also as 401 statuscode in the developer tools of the browser.
But it does not retry the failing request:
Any idea why?
The docs are not very helpful here.
Is
post
not supported there?The text was updated successfully, but these errors were encountered: