Skip to content

Commit

Permalink
[Feat] TeamSparker#603 - 인증한 유저에게 스파크 보내기했을 때 예외처리
Browse files Browse the repository at this point in the history
  • Loading branch information
hyun99999 committed May 9, 2022
1 parent 637353b commit ebff833
Showing 1 changed file with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,18 @@ extension SendSparkVC {
self.dismiss(animated: true) {
presentVC?.showSparkToast(x: 20, y: 44, message: "\(self.userName ?? "")에게 스파크를 보냈어요!")
}
case .requestErr(let message):
print("sendSparkWithAPI - requestErr: \(message)")
case .requestErr(let status):
if status as? Int == 440 {
let presentVC = self.presentingViewController
self.dismiss(animated: true) {
NotificationCenter.default.post(name: .updateHabitRoom, object: nil)
DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) {
presentVC?.showSparkToast(x: 20, y: 44, message: "\(self.userName ?? "")에게 스파크를 보냈어요!")
}
}
}

print("sendSparkWithAPI - requestErr: \(status)")
case .pathErr:
print("sendSparkWithAPI - pathErr")
case .serverErr:
Expand Down

0 comments on commit ebff833

Please sign in to comment.