refactor: Reduce duplicate code with Error.message()

also add some things I forgot in previous commits
This commit is contained in:
naturecodevoid
2023-06-01 07:36:40 -07:00
parent 175b5bec95
commit 7bb1c1cf05
6 changed files with 21 additions and 14 deletions

View File

@@ -88,7 +88,7 @@ struct AsyncFallibleButton<Label: View>: View {
} catch {
DispatchQueue.main.async {
state = .error
errorAlertMessage = (error as? LocalizedError)?.failureReason ?? error.localizedDescription
errorAlertMessage = error.message()
showErrorAlert = true
}
}