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

issue#63 관리자 페이지 error boundary 추가 #66

Merged
merged 8 commits into from
Dec 31, 2024

Conversation

ppochaco
Copy link
Member

@ppochaco ppochaco commented Dec 27, 2024

📝 상세 내용

  • /admin 도메인에서 공통화된 에러를 error boundary를 사용해 공통으로 처리했습니다.

    • 404, 409 에러는 사용자에게 toast 알림으로 잘못된 액션이 발생했다는 것을 알려줍니다.
      • 404: 해당 학기를 찾을 수 없습니다., 해당 활동을 찾을 수 없습니다. ...
      • 409: 해당 학기에 활동이 존재하는 경우 삭제할 수 없습니다., 해당 활동에 게시판이 존재하는 경우 삭제할 수 없습니다. ...
    • 이외의 에러는 사용자에게 에러 메시지를 숨기고 새로고침(뒤로가기) 버튼을 보여줍니다.
  • 권한 관련 에러(403)는 global error boundary로 관리하고자 합니다.

  • useMutation에서 error를 catch 할 때, QueryErrorResetBoundary를 사용해야해서 ErrorHandlingWrapper 컴포넌트를 커스텀해서 사용했습니다.

  • 우측 하단에 toast가 보이는데 뭔가 가독성이 안 좋은 거 같네요,, 다른 분들은 어떤가요??

#️⃣ 이슈 번호

🔗 참고 자료

  • /query/latest/docs/framework/react/reference/QueryErrorResetBoundary

📷 스크린샷(선택)

  • 404, 409 error
    스크린샷 2024-12-27 오후 11 40 53
  • 그 외 error
    스크린샷 2024-12-27 오후 11 42 30

@ppochaco ppochaco self-assigned this Dec 27, 2024
@ppochaco ppochaco linked an issue Dec 27, 2024 that may be closed by this pull request
4 tasks
@joojjang
Copy link
Collaborator

  • 우측 하단에 toast가 보이는데 뭔가 가독성이 안 좋은 거 같네요,, 다른 분들은 어떤가요??

그럼 우상단은 어땨요??
제가 몸이 안좋아서 코드는 조금 있다가 확인하도록 할게요...

@ppochaco
Copy link
Member Author

스크린샷 2024-12-29 오후 9 56 36 error toast 위치를 우상단으로 수정하고, 배경색도 눈에 잘 띄는 걸로 변경했습니당

@ppochaco ppochaco merged commit cd3f868 into develop Dec 31, 2024
1 check passed
@ppochaco ppochaco deleted the feature/#63-admin-error-boundary branch December 31, 2024 08:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

관리자 페이지에 error boundary 추가하기
2 participants