commit 976cfd88289d13ce0332a9eee7219c8033ce93a4 parent f539398a77d3985b5fa6fe8b77f2a62f904fb875 Author: Marc Stibane <marc@taler.net> Date: Thu, 20 Aug 2026 19:47:42 +0200 AI: error handling Diffstat:
| M | TalerCommon/HelperViews/TransactionButton.swift | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/TalerCommon/HelperViews/TransactionButton.swift b/TalerCommon/HelperViews/TransactionButton.swift @@ -73,10 +73,13 @@ struct TransactionButton: View { private func doAction() { disabled = true // don't try this more than once Task { // runs on MainActor - if let _ = try? await action(transactionId, false) { + do { + try await action(transactionId, false) // symLog.log("\(executed) \(transactionId)") executed = true // change button text didExecute = true + } catch { + disabled = false // allow the user to retry after a failure } } }