Skip to content

[FIX] 랜덤 편지 조회 시 isPinned 최신 상태 반영#169

Merged
ownue merged 4 commits intodevelopfrom
fix/#168-random-letter-pinned
Feb 18, 2026
Merged

[FIX] 랜덤 편지 조회 시 isPinned 최신 상태 반영#169
ownue merged 4 commits intodevelopfrom
fix/#168-random-letter-pinned

Conversation

@choehyeonjin
Copy link
Collaborator

@choehyeonjin choehyeonjin commented Feb 18, 2026

📌 PR 개요

  • 랜덤 편지 조회 API에서 편지 고정(isPinned) 상태가 최신으로 반영되지 않던 문제를 수정했습니다.
  • 또한 hasLetter=false 상태가 캐싱되어 이후 편지 추가 시에도 계속 편지가 없음으로 내려오던 문제를 수정했습니다.

🔗 관련 이슈


🛠 변경 사항

  • 응답 생성 시 isPinned는 DB에서 실시간 조회하도록 변경했습니다.

⚠️ 리뷰 시 참고 사항

  • 편지 고정/편지 처음 생성 최신 반영 테스트 완료했습니당

✅ 체크리스트

  • 로컬에서 정상 실행됨
  • 로그 / 네이밍 정리
  • main / develop 직접 커밋 아님

@coderabbitai
Copy link

coderabbitai bot commented Feb 18, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#168-random-letter-pinned

Tip

Issue Planner is now in beta. Read the docs and try it out! Share your feedback on Discord.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@ownue ownue left a comment

Choose a reason for hiding this comment

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

수고하셨습니다! 리뷰 한 번만 확인해주세요 ㅎ.ㅎ

Comment on lines 43 to 44
if (cached != null) {
RandomLetterCacheValue v = fromJson(cached);
Copy link
Contributor

Choose a reason for hiding this comment

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

raw 파일을 열어서 fromJson이라는 코드를 확인했는데, 지금 파싱이 실패하면 GeneralException(INTERNAL_ERROR)를 throw 하고 있더라구요! 그런데 여기서는 깨진 캐시면 삭제 후 재생성을 목표로 하고 있어서 오류가 날 것 같아요! (파싱이 깨지면 v == null 경로로 가지 않고 그냥 500 에러 반환)

fromJson 코드를 에러로 throw 하지 말고 null을 반환하게 하는 건 어떨까요!?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

헉 맞네요!! 수정하겠습니다

@choehyeonjin choehyeonjin requested a review from ownue February 18, 2026 16:10
@ownue ownue merged commit f8180f1 into develop Feb 18, 2026
2 checks passed
@choehyeonjin choehyeonjin deleted the fix/#168-random-letter-pinned branch February 18, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 랜덤 편지 조회 시 편지 고정 최신 상태 반영

2 participants