Skip to content

Commit

Permalink
✨ :: [#1293] 중복닉네임 에러 캐치
Browse files Browse the repository at this point in the history
  • Loading branch information
KangTaeHoon committed Sep 7, 2024
1 parent 19699ba commit 24c33d9
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Projects/Domains/UserDomain/Sources/API/UserAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,9 @@ extension UserAPI: WMAPI {
return [
400: .badRequest,
401: .tokenExpired,
403: .forbidden,
404: .notFound,
409: .conflict,
429: .tooManyRequest,
500: .internalServerError
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,8 +117,6 @@ private extension MultiPurposePopupViewController {

private extension MultiPurposePopupViewController {
func configureUI() {
limitLabel.text = "/\(viewModel.type.textLimitCount)"

titleLabel.text = viewModel.type.title
titleLabel.font = DesignSystemFontFamily.Pretendard.medium.font(size: 18)
titleLabel.textColor = DesignSystemAsset.BlueGrayColor.gray900.color
Expand Down Expand Up @@ -155,6 +153,7 @@ private extension MultiPurposePopupViewController {
confirmLabel.font = DesignSystemFontFamily.Pretendard.light.font(size: 12)
confirmLabel.isHidden = true

limitLabel.text = "/\(viewModel.type.textLimitCount)"
limitLabel.font = DesignSystemFontFamily.Pretendard.light.font(size: 12)
limitLabel.textColor = DesignSystemAsset.BlueGrayColor.gray500.color

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,10 +295,14 @@ private extension MyInfoReactor {
)
.catch { error in
let error = error.asWMError
return .concat(
.just(.showToast(error.errorDescription ?? LocalizationStrings.unknownErrorWarning)),
.just(.dismissEditSheet)
)
if error == .conflict {
return .just(.showToast("키워드 혹은 중복된 닉네임은 사용할 수 없습니다."))
} else {
return .concat(
.just(.showToast(error.errorDescription ?? LocalizationStrings.unknownErrorWarning)),
.just(.dismissEditSheet)
)
}
}
}

Expand Down

0 comments on commit 24c33d9

Please sign in to comment.