Skip to content

[Feature] 전역 ErrorBoundary 및 React Query onError 연동 #35

@mindaaaa

Description

@mindaaaa

기능 설명

  • 전역 ErrorBoundary를 구현하고 bug 계층과 연결한다.

대상

- React 렌더링 중 발생한 예외
- unhandled promise rejection
- React Query onError

ErrorBoundary 예시

componentDidCatch(error, info) {
  log.bug(error, {
    componentStack: info.componentStack
  })
}

React Query 설정

new QueryClient({
  defaultOptions: {
    queries: {
      onError: (error, query) => {
        log.bug(error, {
          operationId: query.meta?.operationId
        })
      }
    }
  }
})

완료 조건

  • ErrorBoundary가 app/providers에 적용됨
  • React Query onError 연결됨
  • 런타임 예외 발생 시 bug 계층으로 전송됨

Metadata

Metadata

Assignees

Labels

type: feature사용자에게 새로운 기능이나 행동 변화를 제공하는 작업

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions