From 5d23eb36354d07508a015531f298b3e261bbafce Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 22 Mar 2022 21:16:38 +0100 Subject: wallet: improve error handling and error codes --- packages/taler-wallet-core/src/operations/backup/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'packages/taler-wallet-core/src/operations/backup') diff --git a/packages/taler-wallet-core/src/operations/backup/index.ts b/packages/taler-wallet-core/src/operations/backup/index.ts index 48eea56ad..400406ce3 100644 --- a/packages/taler-wallet-core/src/operations/backup/index.ts +++ b/packages/taler-wallet-core/src/operations/backup/index.ts @@ -48,7 +48,7 @@ import { PreparePayResultType, RecoveryLoadRequest, RecoveryMergeStrategy, - TalerErrorDetails, + TalerErrorDetail, AbsoluteTime, URL, WalletBackupContentV1, @@ -464,7 +464,7 @@ async function incrementBackupRetryInTx( backupProviders: typeof WalletStoresV1.backupProviders; }>, backupProviderBaseUrl: string, - err: TalerErrorDetails | undefined, + err: TalerErrorDetail | undefined, ): Promise { const pr = await tx.backupProviders.get(backupProviderBaseUrl); if (!pr) { @@ -487,7 +487,7 @@ async function incrementBackupRetryInTx( async function incrementBackupRetry( ws: InternalWalletState, backupProviderBaseUrl: string, - err: TalerErrorDetails | undefined, + err: TalerErrorDetail | undefined, ): Promise { await ws.db .mktx((x) => ({ backupProviders: x.backupProviders })) @@ -509,7 +509,7 @@ export async function processBackupForProvider( throw Error("unknown backup provider"); } - const onOpErr = (err: TalerErrorDetails): Promise => + const onOpErr = (err: TalerErrorDetail): Promise => incrementBackupRetry(ws, backupProviderBaseUrl, err); const run = async () => { @@ -700,7 +700,7 @@ export interface ProviderInfo { /** * Last communication issue with the provider. */ - lastError?: TalerErrorDetails; + lastError?: TalerErrorDetail; lastSuccessfulBackupTimestamp?: TalerProtocolTimestamp; lastAttemptedBackupTimestamp?: TalerProtocolTimestamp; paymentProposalIds: string[]; -- cgit v1.2.3