-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] 중복된 닉네임의 오류 메세지 수정 #446
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
base: develop
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @PeraSite, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 풀 리퀘스트는 사용자 경험을 개선하기 위해 닉네임 중복 시 발생하는 오류 메시지를 더욱 구체적이고 정확하게 변경합니다. 기존에는 모호했던 오류 메시지가 이제는 사용자가 문제의 원인을 즉시 이해할 수 있도록 명확하게 안내하여, 불필요한 혼란을 줄이고 서비스 사용성을 높이는 데 기여합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
중복된 닉네임에 대한 오류 메시지를 더 구체적으로 수정하여 사용자 경험을 개선한 점이 좋습니다. 코드의 전반적인 아키텍처와 유지보수성을 향상시킬 수 있는 오류 처리 및 문자열 관리에 대한 제안을 한 가지 남겼습니다.
| Result.failure( | ||
| Exception("올바르지 않은 닉네임이에요.") | ||
| Exception("이미 사용 중인 닉네임이에요.") | ||
| ) |
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.
사용자에게 보여주는 오류 메시지를 Exception에 문자열로 하드코딩하는 방식은 몇 가지 단점이 있습니다.
- 유지보수: 문자열이 코드 전체에 흩어져 있으면 관리하기 어렵습니다.
- 재사용성: 동일한 오류에 대해 다른 메시지를 사용하게 될 수 있습니다.
- 다국어 지원: 향후 다국어 지원 시 번역이 힘들어집니다.
Result.failure에 Exception 대신 오류 유형을 나타내는 sealed class나 enum을 전달하는 것을 고려해보세요. 예를 들어, 다음과 같이 정의할 수 있습니다.
sealed class NicknameCheckError : Throwable() {
data object Duplicate : NicknameCheckError()
data class ApiError(val msg: String?) : NicknameCheckError()
data object NetworkError : NicknameCheckError()
}이렇게 하면 Repository는 오류의 '종류'만 전달하고, ViewModel이나 UI 계층에서 이 오류 종류에 따라 적절한 문자열 리소스(R.string.*)를 사용자에게 보여줄 수 있습니다. 이는 역할 분리를 명확히 하고 코드의 테스트 용이성과 유지보수성을 높여줍니다. 이 PR의 범위를 넘어서는 개선일 수 있지만, 장기적인 관점에서 적용을 고려해보시면 좋을 것 같습니다.
Summary
이제 숭숭숭숭퍼노바 등의 존재하는 닉네임을 사용하려고 했을 때 기존의 '올바르지 않은 닉네임이에요' 가 아니라 정확하게 '이미 사용 중인 닉네임이에요.' 라고 표기해줍니다
Describe your changes
Issue
To reviewers