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

[FE] 클라이언트 영역 에러 핸들링 개선 (토스트 UI) #419

Merged
merged 9 commits into from
Oct 24, 2024

Commits on Oct 24, 2024

  1. feat: Context API를 사용해서 전역적으로 에러 상태를 관리할 수 있도록 개선

    - 에러 상태와 에러 상태를 변경하는 컨텍스를 구분
    - QueryClientManager 컴포넌트에서 mutation에서 에러가 발생하면 이를 감지해 에러 상태를 업데이트
    - Context API에서 공유받는 데이터를 편하게 사용할 수 있도록, 커스텀 훅으로 useContext를 추상화
    hwinkr committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    ac9eac5 View commit details
    Browse the repository at this point in the history
  2. refactor: fetchClient 함수 로직 변경, fetcher 모듈 생성

    - fetchClient 함수에서 데이터를 반환하는 것이 아니라, 서버의 응답 객체를 반환하는 것으로 수정
    - 예외가 발생했을 경우에는 ResponseError 객체를 생성해서 에러를 throw
    - get, post, postWithResponse, delete 메서드 생성
    hwinkr committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    cec18f9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    27b888b View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    58a4547 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    4f824b5 View commit details
    Browse the repository at this point in the history
  6. refactor: AuthProvider 컴포넌트에서 예외적으로 useParams 훅을 사용하는 것으로 수정

    - 기존 UuidContext를 사용하면 undefined로 참조되는 문제를 해결하기 위해 예외 처리
    hwinkr committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    8e5d8ac View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    e0275f9 View commit details
    Browse the repository at this point in the history
  8. chore: 강조 텍스트 수정

    hwinkr committed Oct 24, 2024
    Configuration menu
    Copy the full SHA
    f381a55 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    2f7d3bb View commit details
    Browse the repository at this point in the history