Skip to content
Permalink
Browse files

SWE-24 add some basic error handling for the user

  • Loading branch information
ahm11003 committed Apr 9, 2019
1 parent dbf152b commit 017b7827f5f6a9499e2a1cb4fdaf71bea7dd1e28
@@ -53,7 +53,11 @@ class TransactionDetailsInterfaceController: WKInterfaceController {
contentGroup.setHidden(true)

FetchData.cancelPayment(accountAlias: acct.accountAlias, confirmationNum: t.confirmationNum, paymentId: t.paymentId) { conf, error in
guard error == nil else { return }
guard error == nil else {
self.presentAlert(withTitle: "Error", message: "We were unable to process your cancellation at this time. Please try again later.", preferredStyle: .alert, actions: [WKAlertAction(title: "Dismiss", style: .default, handler:{})])
return
}

self.activityIndicatorLabel.setHidden(true)
self.activityIndicator.stopAnimating()
self.contentGroup.setHidden(false)

0 comments on commit 017b782

Please sign in to comment.
You can’t perform that action at this time.