Skip to content

Fix follow_redirect/3 doc example for regular redirects#4187

Merged
SteffenDE merged 2 commits intophoenixframework:mainfrom
preciz:fix-follow-redirect-docs
Apr 20, 2026
Merged

Fix follow_redirect/3 doc example for regular redirects#4187
SteffenDE merged 2 commits intophoenixframework:mainfrom
preciz:fix-follow-redirect-docs

Conversation

@preciz
Copy link
Copy Markdown
Contributor

@preciz preciz commented Mar 28, 2026

For :redirect the return tuple of follow_redirect is {:ok, conn}.
The 3 tuple is for :live_redirect.

So to match the previous line's logic this has to be the {:ok, conn}.

The function below that shows the correct return value:

{:error, {:redirect, opts}} ->

Comment thread lib/phoenix_live_view/test/live_view_test.ex Outdated
@SteffenDE SteffenDE merged commit d5ba3a7 into phoenixframework:main Apr 20, 2026
8 checks passed
@SteffenDE
Copy link
Copy Markdown
Collaborator

🙌

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants