Skip to content
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

bug: error: NEXT_REDIRECT #5682

Open
1 task
Dieber opened this issue Apr 28, 2024 · 0 comments
Open
1 task

bug: error: NEXT_REDIRECT #5682

Dieber opened this issue Apr 28, 2024 · 0 comments

Comments

@Dieber
Copy link

Dieber commented Apr 28, 2024

Provide environment information

System:
OS: Linux 5.10 Ubuntu 22.04.1 LTS 22.04.1 LTS (Jammy Jellyfish)
CPU: (8) x64 Intel(R) Core(TM) i7-9700K CPU @ 3.60GHz
Memory: 3.48 GB / 7.69 GB
Container: Yes
Shell: 5.8.1 - /usr/bin/zsh
Binaries:
Node: 18.17.1 - ~/.volta/tools/image/node/18.17.1/bin/node
npm: 9.6.7 - ~/.volta/tools/image/node/18.17.1/bin/npm
pnpm: 8.7.1 - ~/.volta/bin/pnpm
bun: 1.1.4 - ~/.bun/bin/bun
npmPackages:
@tanstack/react-query: ^5.25.0 => 5.32.0
@trpc/client: next => 11.0.0-rc.354+ab11f2310
@trpc/react-query: next => 11.0.0-rc.354+ab11f2310
@trpc/server: next => 11.0.0-rc.354+ab11f2310
next: ^14.2.1 => 14.2.3
react: 18.2.0 => 18.2.0
typescript: ^5.4.2 => 5.4.5

Describe the bug

error: NEXT_REDIRECT
I'm making a server call in RSC, but it crashes the app and displays this error, as shown in the picture.
Now, how can I set up a redirect when user validation fails in a trpc middleware?

Link to reproduction

https://github.com/Dieber/t3-test-redirect

To reproduce

just run bun dev

Additional information

No response

👨‍👧‍👦 Contributing

  • 🙋‍♂️ Yes, I'd be down to file a PR fixing this bug!

Funding

  • You can sponsor this specific effort via a Polar.sh pledge below
  • We receive the pledge once the issue is completed & verified
Fund with Polar
@Dieber Dieber changed the title bug: bug: error: NEXT_REDIRECT Apr 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant