diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-08-27 06:47:13 +0200 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-08-27 06:47:13 +0200 |
commit | 43575b591921e994761fd531bcfe95239119b695 (patch) | |
tree | 3a45472bff1a6647b87fe0727ac46de5f97d47c1 /src/webex/pages | |
parent | b47522c11bf5c426f998254f9dc61f0018229b44 (diff) | |
download | wallet-core-43575b591921e994761fd531bcfe95239119b695.tar.xz |
show error in create reserve dialog
Diffstat (limited to 'src/webex/pages')
-rw-r--r-- | src/webex/pages/confirm-create-reserve.tsx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/webex/pages/confirm-create-reserve.tsx b/src/webex/pages/confirm-create-reserve.tsx index f957364c4..7d543860f 100644 --- a/src/webex/pages/confirm-create-reserve.tsx +++ b/src/webex/pages/confirm-create-reserve.tsx @@ -371,7 +371,7 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> { if (this.statusString()) { return ( <p> - <strong style={{color: "red"}}>{i18n.str`A problem occured, see below. ${this.statusString()}`}</strong> + <strong style={{color: "red"}}>{this.statusString()}</strong> </p> ); } @@ -515,12 +515,9 @@ class ExchangeSelection extends ImplicitStateComponent<ExchangeSelectionProps> { console.dir(r); } catch (e) { console.log("get exchange info rejected", e); - if (e.hasOwnProperty("httpStatus")) { - this.statusString(`Error: request failed with status ${e.httpStatus}`); - } else if (e.hasOwnProperty("errorResponse")) { - const resp = e.errorResponse; - this.statusString(`Error: ${resp.error} (${resp.hint})`); - } + this.statusString(`Error: ${e.message}`); + // Re-try every 5 seconds as long as there is a problem + setTimeout(() => this.statusString() ? this.forceReserveUpdate() : undefined, 5000); } } |