-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 멀티디바이스 푸시 알림 지원을 위한 API 스펙 변경 반영 #221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
fdd3317
[BOOK-430] feat: 서버 스펙 변경 사항 반영
seoyoon513 402b547
[BOOK-430] feat: deviceId, fcmToken 서버 등록 로직 구현
seoyoon513 61072db
[BOOK-430] feat: notification 관련 로직을 UserRepository에서 담당, 로그아웃/회원탈퇴 시…
seoyoon513 962f1c4
[BOOK-430] refactor: resetNotificationData 함수 내부를 try-catch로 감싸서 예외 전…
seoyoon513 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
에러 처리 일관성 및 부분 실패 처리 검토 필요
다음 사항들을 확인해 주세요:
에러 처리 불일치: 이 메서드는 예외를 로깅만 하고 삼키는 반면,
getRemoteFcmToken(),getDeviceId()등 다른 메서드들은 예외를 다시 던집니다.부분 실패 케이스:
deleteRemoteFcmToken()은 성공했지만clearNotificationDataStore()가 실패하거나 그 반대의 경우, 부분적인 정리만 수행됩니다.현재 구현이 "최선의 노력(best effort)" 정리를 의도한 것이라면:
다음과 같이 개선할 수 있습니다:
override suspend fun resetNotificationData() { - try { - deleteRemoteFcmToken() - clearNotificationDataStore() - } catch (e: Exception) { - Logger.e("Failed to reset notification data: ${e.message}") - } + // 각 정리 작업을 독립적으로 시도하여 하나가 실패해도 다른 작업은 수행 + runCatching { + deleteRemoteFcmToken() + }.onFailure { e -> + Logger.e("Failed to delete remote FCM token: ${e.message}") + } + + runCatching { + clearNotificationDataStore() + }.onFailure { e -> + Logger.e("Failed to clear notification datastore: ${e.message}") + } }🤖 Prompt for AI Agents