Skip to content

Conversation

six-standard
Copy link
Member

@six-standard six-standard commented Jul 8, 2025

🔥 변경 사항

Sentry에서 감지한 여러 오류들의 이유로 의심되는 부분들을 조금씩 수정하였습니다.
우선은 이렇게 수정해두고, 이 부분이 오류의 이유가 맞았는지 계속 확인해 볼 계획입니다!

🏷 관련 이슈

  • 관련 이슈: X

📸 스크린샷 (UI 변경 시 필수)

X

📌 체크리스트

  • 기능이 정상적으로 동작하는지 테스트 완료
  • 코드 스타일 가이드 준수 여부 확인
  • 관련 문서 업데이트 완료 (필요 시)

Summary by CodeRabbit

  • 버그 수정
    • 네트워크 요청의 대기 시간이 10초에서 5초로 줄어들어, 요청 실패 시 더 빠르게 처리됩니다.
    • 리더보드 및 메인 페이지에서 데이터가 없을 때 발생할 수 있는 오류를 방지하여, 빈 데이터 상황에서도 앱이 정상적으로 동작하도록 개선되었습니다.

리더보드에서 배열이 비었을 경우에도 map을 실행시키던 문제 해결
Timeout이 과하게 발생하는 오류 수정
post에 401 오류 발생 후 id 값이 undefined로 인식되는 오류 수정
왜인지는 모르겠으나 무조건 IOS 계열에서 발생하는 searchParams가 null로 인식되는 오류 수정
발생 이유에 대해 좀 트래킹해봐야 하지 않을까 싶음
@six-standard six-standard self-assigned this Jul 8, 2025
@six-standard six-standard added the bug Something isn't working label Jul 8, 2025
Copy link

Copy link

coderabbitai bot commented Jul 8, 2025

Walkthrough

이 변경사항은 fetch 요청의 타임아웃을 10초에서 5초로 줄이고, 일부 컴포넌트에서 undefined 상황을 안전하게 처리하도록 배열 연산과 옵셔널 체이닝을 추가하여 런타임 오류를 방지합니다.

Changes

파일/경로 변경 요약
src/apis/instance.request.ts 요청 타임아웃 상수 ABORT_MS를 10,000ms에서 5,000ms로 감소
src/app/(auth-required)/leaderboards/Content.tsx, src/app/(auth-required)/main/Content.tsx 옵셔널 체이닝 추가 및 undefined/null 시 빈 배열로 안전 처리

Possibly related PRs

Suggested reviewers

  • Jihyun3478
  • Nuung
  • ooheunda

Poem

🐇
타임아웃 짧아졌네,
기다림 덜어내고,
옵셔널 체이닝 살포시,
빈 배열도 챙겨주네.
토끼는 코드 속에서
안전히 뛰어다닌다!
🌿🐰


📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 7e28a41 and d31a2a4.

📒 Files selected for processing (1)
  • src/apis/instance.request.ts (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/apis/instance.request.ts
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch refactor/minor-errors

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.
    • Explain this complex logic.
    • 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. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • 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 src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai auto-generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

Documentation and Community

  • 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.

Copy link

@ooheunda ooheunda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 확인 했습니다! 타임아웃은 왠지 리더보드쪽 때문일 것 같네요?! 😂
노션에 써주신 이슈에 대응해서 잘 수정해주신 것 같아요! 고생하셨습니다! 👍 🔥

Copy link

@Jihyun3478 Jihyun3478 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

코드 잘 읽었습니다! 고생하셨습니다~!!

좋았던 점

  • 타임아웃 시간 조정하신 부분이 좋았습니다. 요청 실패 빈도도 줄어들 수 있겠네요!
  • searchParams가 undefined일 경우에도, 안전하게 동작하도록 하신 부분이 좋았습니다!

Copy link
Member

@Nuung Nuung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

좋았던 점

  • sentry 보고 빠르게 이슈 대응, 대응 개발 해주셔서 감사해요! 고생많으셨어요! 전체적으로 type 강화가 좋습니다!!

아쉬운 점

  • 코멘트에 남긴 바와 같이 timeout 은 올리지 않았으면 해요.

import { ServerNotRespondingError } from '@/errors';

const ABORT_MS = 10000;
const ABORT_MS = 15 * 1000; // 타임아웃 시간이 너무 짧은건지..
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

사실 상용 서비스 기준 5초 정도에 무조건 컷해야하는게 맞습니다.. 15초 아무도 못기다려요..
이거 그대로 두는걸 추천,, 저희가 대시보드를 바꾸는게 더 맞는 것 같아요.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

알겠습니다!
사실 timeout 관련 오류가 많아서 일단 반영하긴 했는데, 과한 것 같긴 하네요;;
이참에 5초로 내려보겠습니다!

@six-standard six-standard requested a review from Nuung July 9, 2025 03:52
@six-standard six-standard merged commit 3222061 into main Jul 9, 2025
1 check passed
@six-standard six-standard deleted the refactor/minor-errors branch July 20, 2025 12:03
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

Successfully merging this pull request may close these issues.

4 participants