Skip to content

fix: 타입 에러 수정#195

Merged
ljh130334 merged 2 commits intodevelopfrom
qa/jihyeon
Aug 21, 2025
Merged

fix: 타입 에러 수정#195
ljh130334 merged 2 commits intodevelopfrom
qa/jihyeon

Conversation

@ljh130334
Copy link
Member

@ljh130334 ljh130334 commented Aug 21, 2025

타입 에러 수정 후 다시 PR 올립니다.

Summary by CodeRabbit

  • 신규 기능
    • 댓글 입력 영역에 포커스 표시가 추가되어 키보드 탐색 시 가시성이 향상됩니다.
  • 버그 수정
    • 그룹 상세/참여/멤버 페이지에서 오류 상황 처리 정확도를 높여, 권한 부족·모집기간 만료 시에만 해당 경로로 정확히 리다이렉트됩니다.
    • 네트워크 오류 등 비해당 오류는 원인에 맞게 안내되며, 불필요한 리다이렉트가 줄어듭니다.
  • 스타일
    • 댓글 섹션 포커스 시 보라색 2px 아웃라인과 오프셋이 적용되어 접근성이 개선되었습니다.

@ljh130334 ljh130334 added the 🐞 BugFix Something isn't working label Aug 21, 2025
@vercel
Copy link

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
thip Ready Ready Preview Comment Aug 21, 2025 1:35am

@coderabbitai
Copy link

coderabbitai bot commented Aug 21, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

API 모듈들의 오류 처리에서 AxiosError 타입 가드를 도입해 코드를 엄격화했고, 페이지 컴포넌트들은 unknown 오류에 대한 런타임 가드를 추가해 메시지 기반 리다이렉트를 안전하게 유지했습니다. 스타일 파일에는 focus-visible 아웃라인 규칙이 추가되었습니다. 공개된 시그니처 변경은 없습니다.

Changes

Cohort / File(s) Summary
API 오류 처리 엄격화
src/api/rooms/getRoomDetail.ts, src/api/rooms/getRoomMembers.ts, src/api/rooms/getRoomPlaying.ts
AxiosError import 추가, catch 매개변수 any→unknown, AxiosError instanceof 가드 도입, 코드(100004/140011) 매칭 시 기존 메시지 유지, 비매칭/비-Axios 오류는 재throw
페이지 오류 가드 및 리다이렉트 유지
src/pages/groupDetail/GroupDetail.tsx, src/pages/groupDetail/ParticipatedGroupDetail.tsx, src/pages/groupMembers/GroupMembers.tsx
catch any→unknown, err instanceof Error 가드 후 메시지 접근, 특정 메시지에서만 기존 리다이렉트 수행, 로딩/로깅/일반 오류 흐름 유지
접근성 스타일 추가
src/components/group/CommentSection.styled.ts
&:focus-visible 아웃라인(2px, colors.purple.main, offset 2px) 추가, 동작/시그니처 변경 없음

Sequence Diagram(s)

sequenceDiagram
  autonumber
  actor User
  participant Page as Page (GroupDetail/Participated/Members)
  participant API as API (getRoomDetail/Members/Playing)
  participant Server as Backend
  Note over Page,API: 호출 시 오류는 unknown으로 포착<br/>메시지 접근 전 instanceof Error 가드
  User->>Page: 화면 진입/데이터 요청
  Page->>API: fetch room data
  API->>Server: HTTP 요청
  Server-->>API: 응답 또는 오류
  alt AxiosError && code == 100004
    API-->>Page: throw Error("모집기간이 만료된 방입니다.")
    Page->>Page: err instanceof Error 확인
    Page-->>User: /group/detail/joined/{roomId}로 리다이렉트
  else AxiosError && code == 140011
    API-->>Page: throw Error("방 접근 권한이 없습니다.")
    Page->>Page: err instanceof Error 확인
    Page-->>User: /group 또는 유지된 경로로 리다이렉트
  else Non-Axios or 기타 코드
    API-->>Page: 원본 오류 재throw
    Page->>Page: err instanceof Error 가드 후 일반 처리/로그
    Page-->>User: 일반 오류 메시지 표시
  end
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

📬 API

Poem

토끼는 귀를 곤두세워, 에러 코드를 듣는다.
100004엔 살짝 점프, 140011엔 뒤로 물러선다.
보랏빛 링, 포커스가 반짝! ✨
any를 놓고 unknown을 품어, 안전히 달린다.
오늘도 깔끔한 길, 깡총깡총 코드밭을 누빈다. 🐇

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

💡 Knowledge Base configuration:

  • MCP integration is disabled by default for public repositories
  • Jira integration is disabled by default for public repositories
  • Linear integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between ac65401 and 5db1226.

📒 Files selected for processing (7)
  • src/api/rooms/getRoomDetail.ts (2 hunks)
  • src/api/rooms/getRoomMembers.ts (2 hunks)
  • src/api/rooms/getRoomPlaying.ts (2 hunks)
  • src/components/group/CommentSection.styled.ts (1 hunks)
  • src/pages/groupDetail/GroupDetail.tsx (1 hunks)
  • src/pages/groupDetail/ParticipatedGroupDetail.tsx (1 hunks)
  • src/pages/groupMembers/GroupMembers.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch qa/jihyeon

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@ljh130334 ljh130334 merged commit 55ffb9f into develop Aug 21, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐞 BugFix Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant