Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
SWE-24 add some basic error handling for the user
  • Loading branch information
ahm11003 committed Apr 9, 2019
1 parent dbf152b commit 017b782
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -53,7 +53,11 @@ class TransactionDetailsInterfaceController: WKInterfaceController {
contentGroup.setHidden(true) contentGroup.setHidden(true)


FetchData.cancelPayment(accountAlias: acct.accountAlias, confirmationNum: t.confirmationNum, paymentId: t.paymentId) { conf, error in 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.activityIndicatorLabel.setHidden(true)
self.activityIndicator.stopAnimating() self.activityIndicator.stopAnimating()
self.contentGroup.setHidden(false) self.contentGroup.setHidden(false)
Expand Down

0 comments on commit 017b782

Please sign in to comment.