gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated: better error msg


From: gnunet
Subject: [taler-wallet-core] branch master updated: better error msg
Date: Wed, 13 Dec 2023 22:08:31 +0100

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

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

The following commit(s) were added to refs/heads/master by this push:
     new 4db720c08 better error msg
4db720c08 is described below

commit 4db720c081ca830db81363e9a8acfd4dddbf9120
Author: Sebastian <sebasjm@gmail.com>
AuthorDate: Wed Dec 13 18:07:00 2023 -0300

    better error msg
---
 packages/web-util/src/utils/http-impl.sw.ts | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/packages/web-util/src/utils/http-impl.sw.ts 
b/packages/web-util/src/utils/http-impl.sw.ts
index 295681b53..3120309f4 100644
--- a/packages/web-util/src/utils/http-impl.sw.ts
+++ b/packages/web-util/src/utils/http-impl.sw.ts
@@ -182,6 +182,7 @@ function makeJsonHandler(
       try {
         responseJson = await response.json();
       } catch (e) {
+        const message = e instanceof Error ? `Invalid JSON from HTTP response: 
${e.message}` : "Invalid JSON from HTTP response"
         throw TalerError.fromDetail(
           TalerErrorCode.WALLET_RECEIVED_MALFORMED_RESPONSE,
           {
@@ -189,7 +190,7 @@ function makeJsonHandler(
             requestMethod,
             httpStatusCode: response.status,
           },
-          "Invalid JSON from HTTP response",
+         message,
         );
       }
     }
@@ -201,7 +202,7 @@ function makeJsonHandler(
           requestMethod,
           httpStatusCode: response.status,
         },
-        "Invalid JSON from HTTP response",
+        "Invalid JSON from HTTP response: null or not object",
       );
     }
     return responseJson;

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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