From 8c33e05bf08976403719a17b1faf424109a7eaa5 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 1 Sep 2020 18:27:22 +0530 Subject: harmonized error codes --- packages/taler-wallet-core/src/operations/pay.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/pay.ts') diff --git a/packages/taler-wallet-core/src/operations/pay.ts b/packages/taler-wallet-core/src/operations/pay.ts index 7b8a1efac..6981b44fc 100644 --- a/packages/taler-wallet-core/src/operations/pay.ts +++ b/packages/taler-wallet-core/src/operations/pay.ts @@ -46,7 +46,7 @@ import { } from "../types/talerTypes"; import { ConfirmPayResult, - OperationErrorDetails, + TalerErrorDetails, PreparePayResult, RefreshReason, PreparePayResultType, @@ -516,7 +516,7 @@ async function recordConfirmPay( async function incrementProposalRetry( ws: InternalWalletState, proposalId: string, - err: OperationErrorDetails | undefined, + err: TalerErrorDetails | undefined, ): Promise { await ws.db.runWithWriteTransaction([Stores.proposals], async (tx) => { const pr = await tx.get(Stores.proposals, proposalId); @@ -539,7 +539,7 @@ async function incrementProposalRetry( async function incrementPurchasePayRetry( ws: InternalWalletState, proposalId: string, - err: OperationErrorDetails | undefined, + err: TalerErrorDetails | undefined, ): Promise { logger.warn("incrementing purchase pay retry with error", err); await ws.db.runWithWriteTransaction([Stores.purchases], async (tx) => { @@ -565,7 +565,7 @@ export async function processDownloadProposal( proposalId: string, forceNow = false, ): Promise { - const onOpErr = (err: OperationErrorDetails): Promise => + const onOpErr = (err: TalerErrorDetails): Promise => incrementProposalRetry(ws, proposalId, err); await guardOperationException( () => processDownloadProposalImpl(ws, proposalId, forceNow), @@ -1205,7 +1205,7 @@ export async function processPurchasePay( proposalId: string, forceNow = false, ): Promise { - const onOpErr = (e: OperationErrorDetails): Promise => + const onOpErr = (e: TalerErrorDetails): Promise => incrementPurchasePayRetry(ws, proposalId, e); await guardOperationException( () => processPurchasePayImpl(ws, proposalId, forceNow), -- cgit v1.2.3