Skip to content

Commit

Permalink
Merge pull request #68 from winebarrel/fix_error_catch
Browse files Browse the repository at this point in the history
Fix error catch
  • Loading branch information
winebarrel authored Nov 5, 2024
2 parents d37c274 + b88e7af commit 9374007
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions PagerCall/PagerDutyModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@ class PagerDutyModel: ObservableObject {
if !newIncidents.isEmpty {
notify(newIncidents)
}
} catch let pdErr as PagerDutyError {
status = .error
error = pdErr
} catch {
Logger.shared.error("failed to get incidents: \(error)")

if let pdErr = error as? PagerDutyError {
status = .error
self.error = pdErr
}
}
}

Expand Down

0 comments on commit 9374007

Please sign in to comment.