From e7252574d28b45185d955dc0d3c4b2fb4334d564 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 26 Feb 2026 01:41:06 +0900 Subject: [PATCH] =?UTF-8?q?fix(content-series):=20=EC=B0=A8=EB=8B=A8=20?= =?UTF-8?q?=EC=A0=91=EA=B7=BC=20=EC=98=A4=EB=A5=98=20=EB=A9=94=EC=8B=9C?= =?UTF-8?q?=EC=A7=80=20=ED=82=A4=EB=A5=BC=20=EB=B6=84=EB=A6=AC=ED=95=9C?= =?UTF-8?q?=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...260226_콘텐츠시리즈상세차단오류메시지수정.md | 17 +++++++++++++++++ .../sodalive/content/AudioContentService.kt | 2 +- .../content/series/ContentSeriesService.kt | 2 +- .../sodalive/i18n/SodaMessageSource.kt | 10 ++++++++++ 4 files changed, 29 insertions(+), 2 deletions(-) create mode 100644 docs/20260226_콘텐츠시리즈상세차단오류메시지수정.md diff --git a/docs/20260226_콘텐츠시리즈상세차단오류메시지수정.md b/docs/20260226_콘텐츠시리즈상세차단오류메시지수정.md new file mode 100644 index 00000000..b9e9815f --- /dev/null +++ b/docs/20260226_콘텐츠시리즈상세차단오류메시지수정.md @@ -0,0 +1,17 @@ +# 2026-02-26 콘텐츠/시리즈 상세 차단 오류메시지 수정 + +## 구현 체크리스트 +- [x] 콘텐츠 상세(`getDetail`) 차단 예외 메시지 키를 전용 차단 키로 변경 +- [x] 시리즈 상세(`getSeriesDetail`) 차단 예외 메시지 키를 전용 차단 키로 변경 +- [x] `SodaMessageSource`에 콘텐츠/시리즈 차단 전용 메시지 키 추가 +- [x] 정적 진단 및 테스트로 변경 영향 검증 + +## 검증 기록 +### 1차 구현 +- 무엇: `AudioContentService.getDetail`의 차단 예외 키를 `content.error.blocked_access`로 변경하고, `ContentSeriesService.getSeriesDetail`의 차단 예외 키를 `series.error.blocked_access`로 변경했다. `SodaMessageSource`에 두 키를 추가해 한국어 기준으로 각각 "콘텐츠 접근이 차단되었습니다.", "시리즈 접근이 차단되었습니다."를 반환하도록 반영했다. +- 왜: 기존에는 차단 상황에서도 `invalid_content_retry`/`invalid_series_retry`를 사용해 오류 의미가 모호했고, 요청 사항대로 차단 상황을 명확한 문구로 안내해야 했기 때문이다. +- 어떻게: + - `lsp_diagnostics` (`AudioContentService.kt`, `ContentSeriesService.kt`, `SodaMessageSource.kt`) 실행: 실패 (현재 실행 환경에 Kotlin LSP 미구성으로 `.kt` 진단 불가) + - `./gradlew test` 실행: 성공 + - `./gradlew ktlintCheck` 실행: 성공 + - `./gradlew build` 실행: 성공 diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt index e810c95f..033bb73b 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/AudioContentService.kt @@ -525,7 +525,7 @@ class AudioContentService( ?: throw SodaException(messageKey = "content.error.user_not_found") if (isBlockedBetweenMembers(memberId = member.id!!, creatorId = creatorId)) { - throw SodaException(messageKey = "content.error.invalid_content_retry") + throw SodaException(messageKey = "content.error.blocked_access") } val creatorFollowing = explorerQueryRepository.getCreatorFollowing( diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt index 36078b84..6f32b812 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/content/series/ContentSeriesService.kt @@ -247,7 +247,7 @@ class ContentSeriesService( val isBlocked = blockMemberRepository.isBlocked(blockedMemberId = member.id!!, memberId = series.member!!.id!!) || blockMemberRepository.isBlocked(blockedMemberId = series.member!!.id!!, memberId = member.id!!) if (isBlocked) { - throw SodaException(messageKey = "series.error.invalid_series_retry") + throw SodaException(messageKey = "series.error.blocked_access") } val creatorFollowing = explorerQueryRepository.getCreatorFollowing( diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt b/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt index 1fa07b51..68e4aad0 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/i18n/SodaMessageSource.kt @@ -103,6 +103,11 @@ class SodaMessageSource { Lang.EN to "Access to content is restricted at %s's request.", Lang.JA to "%sさんの要請によりコンテンツへのアクセスが制限されています。" ), + "content.error.blocked_access" to mapOf( + Lang.KO to "콘텐츠 접근이 차단되었습니다.", + Lang.EN to "Content access is blocked.", + Lang.JA to "コンテンツへのアクセスがブロックされました。" + ), "content.error.pin_available_after_open" to mapOf( Lang.KO to "콘텐츠 오픈 후 채널에 고정이 가능합니다.", Lang.EN to "You can pin it to the channel after the content is opened.", @@ -261,6 +266,11 @@ class SodaMessageSource { Lang.KO to "잘못된 시리즈 입니다.\n다시 시도해 주세요", Lang.EN to "Invalid series.\nPlease try again.", Lang.JA to "不正なシリーズです。\nもう一度お試しください。" + ), + "series.error.blocked_access" to mapOf( + Lang.KO to "시리즈 접근이 차단되었습니다.", + Lang.EN to "Series access is blocked.", + Lang.JA to "シリーズへのアクセスがブロックされました。" ) )