Skip to content

♻️ refactor: 오타 수정, 오류 출력 수정#64

Merged
ybin4548 merged 1 commit into
developfrom
Feature/CustomMissionCell#61
Mar 30, 2026
Merged

♻️ refactor: 오타 수정, 오류 출력 수정#64
ybin4548 merged 1 commit into
developfrom
Feature/CustomMissionCell#61

Conversation

@ybin4548
Copy link
Copy Markdown
Collaborator

No description provided.

@ybin4548 ybin4548 merged commit 4abc35c into develop Mar 30, 2026
1 of 2 checks passed
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

이번 풀리퀘스트에서는 시스템 이미지 이름의 오타를 수정하고 미션 삭제 시의 에러 처리 로직을 개선하였습니다. 리뷰를 통해, 정의되지 않은 에러 타입에 대해 고정된 메시지를 보여주는 대신 error.localizedDescription을 활용하여 사용자에게 보다 구체적인 에러 정보를 제공하도록 개선 제안이 있었습니다.

Comment on lines +184 to +188
if let coreDataError = error as? CoreDataManager.CoreDataError {
self.showErrorAlert(error: coreDataError)
} else {
self.showErrorAlert(error: .saveFailed)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

high

이 catch 블록에서 모든 오류 타입을 명시적으로 처리해야 합니다. 특정 오류 타입만 발생할 것이라고 간주하여 나머지 처리를 생략하거나 'dead code'로 취급하는 것은 Rx 스트림의 안정성을 해칠 수 있습니다. Rx 스트림에서는 예상치 못한 오류로 인해 스트림이 종료되는 것을 방지하기 위해 모든 오류를 처리해야 하며, 사용자에게는 일반적인 메시지 대신 실제 발생한 오류의 내용을 반영하는 구체적인 메시지를 제공해야 합니다.

catch {
    if let coreDataError = error as? CoreDataManager.CoreDataError {
        self.showErrorAlert(error: coreDataError)
    } else {
        self.showErrorAlert(message: error.localizedDescription)
    }
}
References
  1. In an Rx stream, use a do-catch block to handle all possible error types, not just expected ones, to prevent the stream from terminating unexpectedly.
  2. When displaying errors to the user, provide specific and meaningful messages based on the error type instead of a generic message.

@ybin4548 ybin4548 self-assigned this Mar 30, 2026
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.

1 participant