gnunet-svn
[Top][All Lists]
Advanced

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

[taler-wallet-core] branch master updated (f2bbe872 -> 2b19594e)


From: gnunet
Subject: [taler-wallet-core] branch master updated (f2bbe872 -> 2b19594e)
Date: Thu, 26 Nov 2020 12:27:36 +0100

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

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

    from f2bbe872 better docker instructions
     new c0006300 bump version for upload
     new 2b19594e hide transient errors when accepting a tip

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 packages/taler-wallet-core/src/operations/tip.ts | 23 ++++++++++++++++++++---
 packages/taler-wallet-webextension/manifest.json |  2 +-
 2 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/packages/taler-wallet-core/src/operations/tip.ts 
b/packages/taler-wallet-core/src/operations/tip.ts
index 119695de..cbf61a86 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -40,7 +40,7 @@ import { getRandomBytes, encodeCrock } from 
"../crypto/talerCrypto";
 import { guardOperationException, makeErrorDetails } from "./errors";
 import { NotificationType } from "../types/notifications";
 import { getTimestampNow } from "../util/time";
-import { readSuccessResponseJsonOrThrow } from "../util/http";
+import { getHttpResponseErrorDetails, readSuccessResponseJsonOrThrow } from 
"../util/http";
 import { URL } from "../util/url";
 import { Logger } from "../util/logging";
 import { checkDbInvariant } from "../util/invariants";
@@ -132,11 +132,11 @@ export async function prepareTip(
 
 async function incrementTipRetry(
   ws: InternalWalletState,
-  refreshSessionId: string,
+  walletTipId: string,
   err: TalerErrorDetails | undefined,
 ): Promise<void> {
   await ws.db.runWithWriteTransaction([Stores.tips], async (tx) => {
-    const t = await tx.get(Stores.tips, refreshSessionId);
+    const t = await tx.get(Stores.tips, walletTipId);
     if (!t) {
       return;
     }
@@ -239,6 +239,23 @@ async function processTipImpl(
 
   const req = { planchets: planchetsDetail };
   const merchantResp = await ws.http.postJson(tipStatusUrl.href, req);
+
+  // Hide transient errors.
+  if (
+    tipRecord.retryInfo.retryCounter < 5 &&
+    merchantResp.status >= 500 &&
+    merchantResp.status <= 599
+  ) {
+    const err = makeErrorDetails(
+      TalerErrorCode.WALLET_UNEXPECTED_REQUEST_ERROR,
+      "tip pickup failed (transient)",
+      getHttpResponseErrorDetails(merchantResp),
+    );
+    await incrementTipRetry(ws, tipRecord.walletTipId, err);
+    // FIXME: Maybe we want to signal to the caller that the transient error 
happened?
+    return;
+  }
+
   const response = await readSuccessResponseJsonOrThrow(
     merchantResp,
     codecForTipResponse(),
diff --git a/packages/taler-wallet-webextension/manifest.json 
b/packages/taler-wallet-webextension/manifest.json
index 07fec04e..0931d118 100644
--- a/packages/taler-wallet-webextension/manifest.json
+++ b/packages/taler-wallet-webextension/manifest.json
@@ -4,7 +4,7 @@
   "name": "GNU Taler Wallet (git)",
   "description": "Privacy preserving and transparent payments",
   "author": "GNU Taler Developers",
-  "version": "0.8.0.3",
+  "version": "0.8.0.4",
   "version_name": "0.8.0",
 
   "minimum_chrome_version": "51",

-- 
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]