From 52707f87e7faf1ae985c88b6787b688d121b538b Mon Sep 17 00:00:00 2001
From: Florian Dold <florian.dold@gmail.com>
Date: Fri, 22 Apr 2016 18:03:56 +0200
Subject: adapt to protocol changes and improve error handling

---
 pages/confirm-create-reserve.tsx | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

(limited to 'pages/confirm-create-reserve.tsx')

diff --git a/pages/confirm-create-reserve.tsx b/pages/confirm-create-reserve.tsx
index be84fff2b..1c3bf7cbb 100644
--- a/pages/confirm-create-reserve.tsx
+++ b/pages/confirm-create-reserve.tsx
@@ -121,8 +121,9 @@ class Controller {
           console.log("get exchange info rejected");
           if (e.hasOwnProperty("httpStatus")) {
             this.statusString = `request failed with status ${this.request.status}`;
-          } else {
-            this.statusString = `unknown request error`;
+          } else if (e.hasOwnProperty("errorResponse")) {
+            let resp = e.errorResponse;
+            this.statusString = `error: ${resp.error} (${resp.hint})`;
           }
           m.endComputation();
         });
-- 
cgit v1.2.3

