bug: useSuspenseQuery
will get "UNAUTHORIZED" tRPC error
#1765
Labels
🐞 upstream bug
Blocked by a bug upstream
useSuspenseQuery
will get "UNAUTHORIZED" tRPC error
#1765
Provide environment information
System:
OS: macOS 14.2.1
CPU: (8) arm64 Apple M1 Pro
Memory: 196.13 MB / 16.00 GB
Shell: 5.9 - /bin/zsh
Binaries:
Node: 20.9.0 - ~/.nvm/versions/node/v20.9.0/bin/node
Yarn: 1.22.21 - ~/.nvm/versions/node/v20.9.0/bin/yarn
npm: 10.1.0 - ~/.nvm/versions/node/v20.9.0/bin/npm
pnpm: 8.14.0 - ~/Library/pnpm/pnpm
Describe the bug
If we have a protected api like:
Then we use
useSuspenseQuery
We will get the error
UNAUTHORIZED
fromCleanShot.2024-02-19.at.17.54.35.mp4
You can check the detail of my code in this commit: Crayon-ShinChan/t3-trpc-suspense-bug@b747bba
Reproduction repo
https://github.com/Crayon-ShinChan/t3-trpc-suspense-bug
To reproduce
DISCORD_CLIENT_ID
,DISCORD_CLIENT_SECRET
to .env filepnpm dev
Additional information
No response
The text was updated successfully, but these errors were encountered: