gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: error handling


From: gnunet
Subject: [taler-wallet-core] branch master updated: error handling
Date: Sat, 28 Dec 2019 16:21:33 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 3c85a0d1 error handling
3c85a0d1 is described below

commit 3c85a0d14ee279d529ab50afa3b375ec41880466
Author: Florian Dold <address@hidden>
AuthorDate: Sat Dec 28 16:21:21 2019 +0100

    error handling
---
 src/webex/wxApi.ts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/src/webex/wxApi.ts b/src/webex/wxApi.ts
index 1383ffbc..bb5222a2 100644
--- a/src/webex/wxApi.ts
+++ b/src/webex/wxApi.ts
@@ -85,6 +85,10 @@ async function callBackend<T extends MessageType>(
 ): Promise<MessageMap[T]["response"]> {
   return new Promise<MessageMap[T]["response"]>((resolve, reject) => {
     chrome.runtime.sendMessage({ type, detail }, (resp) => {
+      if (chrome.runtime.lastError) {
+        console.log("Error calling backend");
+        reject(new Error(`Error contacting backend: 
chrome.runtime.lastError.message`));
+      }
       if (typeof resp === "object" && resp && resp.error) {
         console.warn("response error:", resp)
         const e = new WalletApiError(resp.error.message, resp.error);

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



reply via email to

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