fix(AsyncFallibleButton): try to use failureReason and then fallback to localizedDescription

This commit is contained in:
naturecodevoid
2023-04-09 13:41:58 -07:00
parent 994b2318a9
commit 62a478277e

View File

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