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] 401 Error w/ React Suspense #16

Open
yumincho opened this issue May 22, 2024 · 0 comments
Open

[Bug] 401 Error w/ React Suspense #16

yumincho opened this issue May 22, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@yumincho
Copy link
Member

Describe the bug

PR #12 에서 구현한 Header에서 발생하는 문제입니다. React Suspense 안에서 TanStack Query 써서 api 호출할 때 (board groups를 불러옵니다) 쿠키 auth 정보가 없어서 401 에러가 뜨는 것 같습니다.

Expected behavior

session ID가 존재하기 때문에 401 에러가 발생하지 않아야 합니다.

image

To Reproduce

  1. local에 띄웁니다.
  2. dev 계정으로 로그인합니다. (전 @injoonH 계정으로 로그인했습니다.)
  3. Header가 로딩되면서 에러가 발생합니다.

Screenshots

image

Possible Solution

  1. TanStack Query가 지원하는 isFetching 등 활용해서 Custom Suspense 만들기
  2. 백에서 api 권한 수정해주기
  3. TanStack Query가 지원할 때까지 기다리기
  4. 그대로 두기

Additional context

@yumincho yumincho added the bug Something isn't working label May 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant