[Workers] Request redirect mode: only follow and manual are supported - #33362
Open
stayinalive181 wants to merge 1 commit into
Open
[Workers] Request redirect mode: only follow and manual are supported#33362stayinalive181 wants to merge 1 commit into
stayinalive181 wants to merge 1 commit into
Conversation
The Request page listed `error` as a valid redirect mode in both the
RequestInit option and the read-only property. workerd rejects it at
Request construction with a TypeError ("Invalid redirect value, must be
one of "follow" or "manual" ("error" won't be implemented since it does not
make sense at the edge; use "manual" and check the response status
code)."), so a Worker that passes it never sends the request. Document the
two supported values and the behaviour of `error`.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
stayinalive181
requested review from
a team,
GregBrimble,
MattieTK,
WalshyDev,
irvinebroque,
korinne and
vy-ton
as code owners
September 10, 2026 11:29
Contributor
Review✅ No issues found in commit Code ReviewThis code review is in beta and may not always be helpful — use your judgment. No code review issues found. ConventionsNo convention issues found. Style Guide ReviewNo style-guide issues found. CommandsOnly codeowners can run commands. Post a comment with the command to trigger it.
|
Contributor
|
@stayinalive181 i am curious what you were building / what you were trying to make work when you ran into this |
irvinebroque
left a comment
Contributor
There was a problem hiding this comment.
@jasnell for review
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Correction to the Workers
Requestruntime API page (src/content/docs/workers/runtime-apis/request.mdx).The page currently lists
erroras a valid redirect mode in two places: theredirectoption ofRequestInitand the read-onlyredirectproperty. Workers does not implement that mode. workerd rejects it while parsing theRequestInitdictionary, insrc/workerd/api/http.c++:Because the exception is thrown when the
Requestis constructed,fetch(url, { redirect: "error" })fails before any request is sent, for every URL. Reproduced withwrangler devand on deployed Workers; the identical failure for all destinations makes it look like a network problem, which is how we lost a day to it before finding the message above.Both descriptions now say
followormanual, and explain thaterrorthrows aTypeErrorat construction and thatmanualplus a status-code check is the equivalent. A stray double space on the first line was removed at the same time.Documentation checklist