[refactor/#412] Notification 검증 로직 효율화 및 잠재적 문제 해결, 예외처리 추가#413
Merged
[refactor/#412] Notification 검증 로직 효율화 및 잠재적 문제 해결, 예외처리 추가#413
Conversation
|
❌ The last analysis has failed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 연관 이슈
🌱 PR 요약
🛠 작업 내용
isAbleToSendNotification 검증 로직 개선
Early return 패턴으로 변경하여 기존의 무조건적인 DB조회 수정(status가 ACTIVE 아니거나 deviceToken 없으면 DB 조회 자체를 안 함)
MemberTerm 레코드가 없으면 예외 던지지 않고 false 반환 → 알림 전송만 skip하고 API는 정상 응답
sendPushAfterCommit 예외 처리 보강
FCM 에러 코드(MessagingErrorCode)를 함께 로깅하여 디버깅 정보 강화
FirebaseMessagingException 외의 예외(SDK 내부 RuntimeException, 네트워크 오류 등)도 catch 하도록 추가
알림 이미지 환경변수 사용하도록 수정
일반 알림(팔로우/댓글/좋아요 등)
기존: CodiveNotification 엔티티에서 이미지 url이 NotNull이라 프로필 이미지가 없는 경우 예외 발생
수정:
오늘의 온도 알림
깃허브 시크릿 DEFAULT_PROFILE_IMAGE_URL, TODAY_TEMPERATURE_IMAGE_URL 추가
📸 스크린샷
❗️리뷰어들께
S3 버킷에 icon 폴더 만들어서 이미지 넣어뒀습니다.
URL이 바뀌게 되면 Github Secret의 DEFAULT_PROFILE_IMAGE_URL, TODAY_TEMPERATURE_IMAGE_URL 수정해야합니다.