gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-wallet-webex] 04/04: show error in create reserve di


From: gnunet
Subject: [GNUnet-SVN] [taler-wallet-webex] 04/04: show error in create reserve dialog
Date: Sun, 27 Aug 2017 06:48:06 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository wallet-webex.

commit 43575b591921e994761fd531bcfe95239119b695
Author: Florian Dold <address@hidden>
AuthorDate: Sun Aug 27 06:47:13 2017 +0200

    show error in create reserve dialog
---
 src/webex/pages/confirm-create-reserve.tsx | 11 ++++-------
 src/webex/wxBackend.ts                     |  2 +-
 2 files changed, 5 insertions(+), 8 deletions(-)

diff --git a/src/webex/pages/confirm-create-reserve.tsx 
b/src/webex/pages/confirm-create-reserve.tsx
index f957364c..7d543860 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);
     }
   }
 
diff --git a/src/webex/wxBackend.ts b/src/webex/wxBackend.ts
index 0d1c2d8c..2f249af4 100644
--- a/src/webex/wxBackend.ts
+++ b/src/webex/wxBackend.ts
@@ -352,7 +352,7 @@ async function dispatch(req: any, sender: any, 
sendResponse: any): Promise<void>
     try {
       sendResponse({
         error: "exception",
-        hint: e.message,
+        message: e.message,
         stack,
       });
     } catch (e) {

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]