Replies: 2 comments
-
BYW, if I don't redirect. I get this o [TRPCError]: UNAUTHORIZED
at /app/apps/nextjs/.next/server/chunks/6532.js:1:1097
at r (/app/apps/nextjs/.next/server/chunks/2381.js:1:90577)
at next (/app/apps/nextjs/.next/server/chunks/2381.js:1:90689)
at /app/apps/nextjs/.next/server/chunks/6532.js:1:904
at r (/app/apps/nextjs/.next/server/chunks/2381.js:1:90577)
at e (/app/apps/nextjs/.next/server/chunks/2381.js:1:90919)
at /app/apps/nextjs/.next/server/chunks/2381.js:4:1361
at async v (/app/apps/nextjs/.next/server/chunks/6921.js:2:48950) {
code: 'UNAUTHORIZED',
digest: '3447701378',
[cause]: undefined
} I'm using a custom |
Beta Was this translation helpful? Give feedback.
0 replies
-
For anyone having the same issue. I temporarily solved by using a global |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
create-t3-turbo/packages/api/src/trpc.ts
Line 137 in e5620dd
Hi.
In
api/trpc.ts
, we have thisI'm wondering where we need to
catch
this error, to run anextjs redirect
to a customlogin
page.I've added this in the
nextjs/app/api/[...route]/route.ts
But it doesn't work.
If i add
redirect
inapi/trpc.ts
, it shows this (even after addingredirect
in the finally block).Beta Was this translation helpful? Give feedback.
All reactions