aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2020-09-01 18:27:22 +0530
committerFlorian Dold <florian.dold@gmail.com>2020-09-01 18:27:22 +0530
commit8c33e05bf08976403719a17b1faf424109a7eaa5 (patch)
tree61c72737640c9b552c41f62640cfb0c8c845f38a
parent5056da6548d5880211abd3e1cdacd92134e40dab (diff)
harmonized error codesv0.7.1-dev.23
-rw-r--r--packages/taler-wallet-core/src/operations/errors.ts10
-rw-r--r--packages/taler-wallet-core/src/operations/exchanges.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/pay.ts10
-rw-r--r--packages/taler-wallet-core/src/operations/recoup.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/refresh.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/refund.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/reserves.ts8
-rw-r--r--packages/taler-wallet-core/src/operations/tip.ts6
-rw-r--r--packages/taler-wallet-core/src/operations/withdraw.ts8
-rw-r--r--packages/taler-wallet-core/src/types/dbTypes.ts26
-rw-r--r--packages/taler-wallet-core/src/types/notifications.ts20
-rw-r--r--packages/taler-wallet-core/src/types/pending.ts16
-rw-r--r--packages/taler-wallet-core/src/types/transactions.ts4
-rw-r--r--packages/taler-wallet-core/src/types/walletTypes.ts10
14 files changed, 71 insertions, 71 deletions
diff --git a/packages/taler-wallet-core/src/operations/errors.ts b/packages/taler-wallet-core/src/operations/errors.ts
index 6d9f44e03..de78203e4 100644
--- a/packages/taler-wallet-core/src/operations/errors.ts
+++ b/packages/taler-wallet-core/src/operations/errors.ts
@@ -23,7 +23,7 @@
/**
* Imports.
*/
-import { OperationErrorDetails } from "../types/walletTypes";
+import { TalerErrorDetails } from "../types/walletTypes";
import { TalerErrorCode } from "../TalerErrorCode";
/**
@@ -31,7 +31,7 @@ import { TalerErrorCode } from "../TalerErrorCode";
* but the error has already been reported by writing it to the database.
*/
export class OperationFailedAndReportedError extends Error {
- constructor(public operationError: OperationErrorDetails) {
+ constructor(public operationError: TalerErrorDetails) {
super(operationError.message);
// Set the prototype explicitly.
@@ -52,7 +52,7 @@ export class OperationFailedError extends Error {
return new OperationFailedError(makeErrorDetails(ec, message, details));
}
- constructor(public operationError: OperationErrorDetails) {
+ constructor(public operationError: TalerErrorDetails) {
super(operationError.message);
// Set the prototype explicitly.
@@ -64,7 +64,7 @@ export function makeErrorDetails(
ec: TalerErrorCode,
message: string,
details: Record<string, unknown>,
-): OperationErrorDetails {
+): TalerErrorDetails {
return {
code: ec,
hint: `Error: ${TalerErrorCode[ec]}`,
@@ -80,7 +80,7 @@ export function makeErrorDetails(
*/
export async function guardOperationException<T>(
op: () => Promise<T>,
- onOpError: (e: OperationErrorDetails) => Promise<void>,
+ onOpError: (e: TalerErrorDetails) => Promise<void>,
): Promise<T> {
try {
return await op();
diff --git a/packages/taler-wallet-core/src/operations/exchanges.ts b/packages/taler-wallet-core/src/operations/exchanges.ts
index 3b7f62fe9..76ce874de 100644
--- a/packages/taler-wallet-core/src/operations/exchanges.ts
+++ b/packages/taler-wallet-core/src/operations/exchanges.ts
@@ -20,7 +20,7 @@ import {
codecForExchangeKeysJson,
codecForExchangeWireJson,
} from "../types/talerTypes";
-import { OperationErrorDetails } from "../types/walletTypes";
+import { TalerErrorDetails } from "../types/walletTypes";
import {
ExchangeRecord,
ExchangeUpdateStatus,
@@ -86,7 +86,7 @@ async function denominationRecordFromKeys(
async function setExchangeError(
ws: InternalWalletState,
baseUrl: string,
- err: OperationErrorDetails,
+ err: TalerErrorDetails,
): Promise<void> {
logger.warn(`last error for exchange ${baseUrl}:`, err);
const mut = (exchange: ExchangeRecord): ExchangeRecord => {
@@ -438,7 +438,7 @@ export async function updateExchangeFromUrl(
baseUrl: string,
forceNow = false,
): Promise<ExchangeRecord> {
- const onOpErr = (e: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (e: TalerErrorDetails): Promise<void> =>
setExchangeError(ws, baseUrl, e);
return await guardOperationException(
() => updateExchangeFromUrlImpl(ws, baseUrl, forceNow),
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<void> {
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<void> {
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<void> {
- const onOpErr = (err: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (err: TalerErrorDetails): Promise<void> =>
incrementProposalRetry(ws, proposalId, err);
await guardOperationException(
() => processDownloadProposalImpl(ws, proposalId, forceNow),
@@ -1205,7 +1205,7 @@ export async function processPurchasePay(
proposalId: string,
forceNow = false,
): Promise<void> {
- const onOpErr = (e: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (e: TalerErrorDetails): Promise<void> =>
incrementPurchasePayRetry(ws, proposalId, e);
await guardOperationException(
() => processPurchasePayImpl(ws, proposalId, forceNow),
diff --git a/packages/taler-wallet-core/src/operations/recoup.ts b/packages/taler-wallet-core/src/operations/recoup.ts
index ba02f72f8..7896fc275 100644
--- a/packages/taler-wallet-core/src/operations/recoup.ts
+++ b/packages/taler-wallet-core/src/operations/recoup.ts
@@ -44,7 +44,7 @@ import { forceQueryReserve, getReserveRequestTimeout } from "./reserves";
import { Amounts } from "../util/amounts";
import { createRefreshGroup, processRefreshGroup } from "./refresh";
-import { RefreshReason, OperationErrorDetails } from "../types/walletTypes";
+import { RefreshReason, TalerErrorDetails } from "../types/walletTypes";
import { TransactionHandle } from "../util/query";
import { encodeCrock, getRandomBytes } from "../crypto/talerCrypto";
import { getTimestampNow } from "../util/time";
@@ -58,7 +58,7 @@ const logger = new Logger("operations/recoup.ts");
async function incrementRecoupRetry(
ws: InternalWalletState,
recoupGroupId: string,
- err: OperationErrorDetails | undefined,
+ err: TalerErrorDetails | undefined,
): Promise<void> {
await ws.db.runWithWriteTransaction([Stores.recoupGroups], async (tx) => {
const r = await tx.get(Stores.recoupGroups, recoupGroupId);
@@ -305,7 +305,7 @@ export async function processRecoupGroup(
forceNow = false,
): Promise<void> {
await ws.memoProcessRecoup.memo(recoupGroupId, async () => {
- const onOpErr = (e: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (e: TalerErrorDetails): Promise<void> =>
incrementRecoupRetry(ws, recoupGroupId, e);
return await guardOperationException(
async () => await processRecoupGroupImpl(ws, recoupGroupId, forceNow),
diff --git a/packages/taler-wallet-core/src/operations/refresh.ts b/packages/taler-wallet-core/src/operations/refresh.ts
index 89cc3af43..d951cfeb8 100644
--- a/packages/taler-wallet-core/src/operations/refresh.ts
+++ b/packages/taler-wallet-core/src/operations/refresh.ts
@@ -34,7 +34,7 @@ import { Logger } from "../util/logging";
import { getWithdrawDenomList } from "./withdraw";
import { updateExchangeFromUrl } from "./exchanges";
import {
- OperationErrorDetails,
+ TalerErrorDetails,
CoinPublicKey,
RefreshReason,
RefreshGroupId,
@@ -441,7 +441,7 @@ async function refreshReveal(
async function incrementRefreshRetry(
ws: InternalWalletState,
refreshGroupId: string,
- err: OperationErrorDetails | undefined,
+ err: TalerErrorDetails | undefined,
): Promise<void> {
await ws.db.runWithWriteTransaction([Stores.refreshGroups], async (tx) => {
const r = await tx.get(Stores.refreshGroups, refreshGroupId);
@@ -470,7 +470,7 @@ export async function processRefreshGroup(
forceNow = false,
): Promise<void> {
await ws.memoProcessRefresh.memo(refreshGroupId, async () => {
- const onOpErr = (e: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (e: TalerErrorDetails): Promise<void> =>
incrementRefreshRetry(ws, refreshGroupId, e);
return await guardOperationException(
async () => await processRefreshGroupImpl(ws, refreshGroupId, forceNow),
diff --git a/packages/taler-wallet-core/src/operations/refund.ts b/packages/taler-wallet-core/src/operations/refund.ts
index 0d6b9ec86..2c7427c03 100644
--- a/packages/taler-wallet-core/src/operations/refund.ts
+++ b/packages/taler-wallet-core/src/operations/refund.ts
@@ -25,7 +25,7 @@
*/
import { InternalWalletState } from "./state";
import {
- OperationErrorDetails,
+ TalerErrorDetails,
RefreshReason,
CoinPublicKey,
} from "../types/walletTypes";
@@ -65,7 +65,7 @@ const logger = new Logger("refund.ts");
async function incrementPurchaseQueryRefundRetry(
ws: InternalWalletState,
proposalId: string,
- err: OperationErrorDetails | undefined,
+ err: TalerErrorDetails | undefined,
): Promise<void> {
await ws.db.runWithWriteTransaction([Stores.purchases], async (tx) => {
const pr = await tx.get(Stores.purchases, proposalId);
@@ -438,7 +438,7 @@ export async function processPurchaseQueryRefund(
proposalId: string,
forceNow = false,
): Promise<void> {
- const onOpErr = (e: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (e: TalerErrorDetails): Promise<void> =>
incrementPurchaseQueryRefundRetry(ws, proposalId, e);
await guardOperationException(
() => processPurchaseQueryRefundImpl(ws, proposalId, forceNow),
diff --git a/packages/taler-wallet-core/src/operations/reserves.ts b/packages/taler-wallet-core/src/operations/reserves.ts
index fda3c4bcb..439eb34a6 100644
--- a/packages/taler-wallet-core/src/operations/reserves.ts
+++ b/packages/taler-wallet-core/src/operations/reserves.ts
@@ -17,7 +17,7 @@
import {
CreateReserveRequest,
CreateReserveResponse,
- OperationErrorDetails,
+ TalerErrorDetails,
AcceptWithdrawalResponse,
} from "../types/walletTypes";
import { canonicalizeBaseUrl } from "../util/helpers";
@@ -311,7 +311,7 @@ export async function processReserve(
forceNow = false,
): Promise<void> {
return ws.memoProcessReserve.memo(reservePub, async () => {
- const onOpError = (err: OperationErrorDetails): Promise<void> =>
+ const onOpError = (err: TalerErrorDetails): Promise<void> =>
incrementReserveRetry(ws, reservePub, err);
await guardOperationException(
() => processReserveImpl(ws, reservePub, forceNow),
@@ -375,7 +375,7 @@ async function processReserveBankStatus(
ws: InternalWalletState,
reservePub: string,
): Promise<void> {
- const onOpError = (err: OperationErrorDetails): Promise<void> =>
+ const onOpError = (err: TalerErrorDetails): Promise<void> =>
incrementReserveRetry(ws, reservePub, err);
await guardOperationException(
() => processReserveBankStatusImpl(ws, reservePub),
@@ -480,7 +480,7 @@ async function processReserveBankStatusImpl(
async function incrementReserveRetry(
ws: InternalWalletState,
reservePub: string,
- err: OperationErrorDetails | undefined,
+ err: TalerErrorDetails | undefined,
): Promise<void> {
await ws.db.runWithWriteTransaction([Stores.reserves], async (tx) => {
const r = await tx.get(Stores.reserves, reservePub);
diff --git a/packages/taler-wallet-core/src/operations/tip.ts b/packages/taler-wallet-core/src/operations/tip.ts
index 6dee9c87e..7949648c5 100644
--- a/packages/taler-wallet-core/src/operations/tip.ts
+++ b/packages/taler-wallet-core/src/operations/tip.ts
@@ -16,7 +16,7 @@
import { InternalWalletState } from "./state";
import { parseTipUri } from "../util/taleruri";
-import { TipStatus, OperationErrorDetails } from "../types/walletTypes";
+import { TipStatus, TalerErrorDetails } from "../types/walletTypes";
import {
TipPlanchetDetail,
codecForTipPickupGetResponse,
@@ -137,7 +137,7 @@ export async function getTipStatus(
async function incrementTipRetry(
ws: InternalWalletState,
refreshSessionId: string,
- err: OperationErrorDetails | undefined,
+ err: TalerErrorDetails | undefined,
): Promise<void> {
await ws.db.runWithWriteTransaction([Stores.tips], async (tx) => {
const t = await tx.get(Stores.tips, refreshSessionId);
@@ -160,7 +160,7 @@ export async function processTip(
tipId: string,
forceNow = false,
): Promise<void> {
- const onOpErr = (e: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (e: TalerErrorDetails): Promise<void> =>
incrementTipRetry(ws, tipId, e);
await guardOperationException(
() => processTipImpl(ws, tipId, forceNow),
diff --git a/packages/taler-wallet-core/src/operations/withdraw.ts b/packages/taler-wallet-core/src/operations/withdraw.ts
index 3977ba121..2ab1ea52d 100644
--- a/packages/taler-wallet-core/src/operations/withdraw.ts
+++ b/packages/taler-wallet-core/src/operations/withdraw.ts
@@ -32,7 +32,7 @@ import {
import {
BankWithdrawDetails,
ExchangeWithdrawDetails,
- OperationErrorDetails,
+ TalerErrorDetails,
ExchangeListItem,
} from "../types/walletTypes";
import {
@@ -552,7 +552,7 @@ export async function selectWithdrawalDenoms(
async function incrementWithdrawalRetry(
ws: InternalWalletState,
withdrawalGroupId: string,
- err: OperationErrorDetails | undefined,
+ err: TalerErrorDetails | undefined,
): Promise<void> {
await ws.db.runWithWriteTransaction([Stores.withdrawalGroups], async (tx) => {
const wsr = await tx.get(Stores.withdrawalGroups, withdrawalGroupId);
@@ -574,7 +574,7 @@ export async function processWithdrawGroup(
withdrawalGroupId: string,
forceNow = false,
): Promise<void> {
- const onOpErr = (e: OperationErrorDetails): Promise<void> =>
+ const onOpErr = (e: TalerErrorDetails): Promise<void> =>
incrementWithdrawalRetry(ws, withdrawalGroupId, e);
await guardOperationException(
() => processWithdrawGroupImpl(ws, withdrawalGroupId, forceNow),
@@ -645,7 +645,7 @@ async function processWithdrawGroupImpl(
let numFinished = 0;
let finishedForFirstTime = false;
- let errorsPerCoin: Record<number, OperationErrorDetails> = {};
+ let errorsPerCoin: Record<number, TalerErrorDetails> = {};
await ws.db.runWithWriteTransaction(
[Stores.coins, Stores.withdrawalGroups, Stores.reserves, Stores.planchets],
diff --git a/packages/taler-wallet-core/src/types/dbTypes.ts b/packages/taler-wallet-core/src/types/dbTypes.ts
index 0b2de8b0c..28842398b 100644
--- a/packages/taler-wallet-core/src/types/dbTypes.ts
+++ b/packages/taler-wallet-core/src/types/dbTypes.ts
@@ -35,7 +35,7 @@ import {
} from "./talerTypes";
import { Index, Store } from "../util/query";
-import { OperationErrorDetails, RefreshReason } from "./walletTypes";
+import { TalerErrorDetails, RefreshReason } from "./walletTypes";
import {
ReserveTransaction,
ReserveCreditTransaction,
@@ -335,7 +335,7 @@ export interface ReserveRecord {
* Last error that happened in a reserve operation
* (either talking to the bank or the exchange).
*/
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
/**
@@ -649,7 +649,7 @@ export interface ExchangeRecord {
*/
updateDiff: ExchangeUpdateDiff | undefined;
- lastError?: OperationErrorDetails;
+ lastError?: TalerErrorDetails;
}
/**
@@ -679,7 +679,7 @@ export interface PlanchetRecord {
withdrawalDone: boolean;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
/**
* Public key of the reserve, this might be a reserve not
@@ -910,14 +910,14 @@ export interface ProposalRecord {
*/
retryInfo: RetryInfo;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
/**
* Status of a tip we got from a merchant.
*/
export interface TipRecord {
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
/**
* Has the user accepted the tip? Only after the tip has been accepted coins
@@ -1002,9 +1002,9 @@ export interface RefreshGroupRecord {
*/
retryInfo: RetryInfo;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
- lastErrorPerCoin: { [coinIndex: number]: OperationErrorDetails };
+ lastErrorPerCoin: { [coinIndex: number]: TalerErrorDetails };
refreshGroupId: string;
@@ -1032,7 +1032,7 @@ export interface RefreshGroupRecord {
* Ongoing refresh
*/
export interface RefreshSessionRecord {
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
/**
* Public key that's being melted in this session.
@@ -1383,7 +1383,7 @@ export interface PurchaseRecord {
payRetryInfo: RetryInfo;
- lastPayError: OperationErrorDetails | undefined;
+ lastPayError: TalerErrorDetails | undefined;
/**
* Retry information for querying the refund status with the merchant.
@@ -1393,7 +1393,7 @@ export interface PurchaseRecord {
/**
* Last error (or undefined) for querying the refund status with the merchant.
*/
- lastRefundStatusError: OperationErrorDetails | undefined;
+ lastRefundStatusError: TalerErrorDetails | undefined;
/**
* Continue querying the refund status until this deadline has expired.
@@ -1541,7 +1541,7 @@ export interface WithdrawalGroupRecord {
*/
retryInfo: RetryInfo;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
export interface BankWithdrawUriRecord {
@@ -1606,7 +1606,7 @@ export interface RecoupGroupRecord {
/**
* Last error that occured, if any.
*/
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
export const enum ImportPayloadType {
diff --git a/packages/taler-wallet-core/src/types/notifications.ts b/packages/taler-wallet-core/src/types/notifications.ts
index 945b86eea..0196cebf1 100644
--- a/packages/taler-wallet-core/src/types/notifications.ts
+++ b/packages/taler-wallet-core/src/types/notifications.ts
@@ -22,7 +22,7 @@
/**
* Imports.
*/
-import { OperationErrorDetails } from "./walletTypes";
+import { TalerErrorDetails } from "./walletTypes";
import { WithdrawalSource } from "./dbTypes";
export const enum NotificationType {
@@ -154,32 +154,32 @@ export interface RefundFinishedNotification {
export interface ExchangeOperationErrorNotification {
type: NotificationType.ExchangeOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface RefreshOperationErrorNotification {
type: NotificationType.RefreshOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface RefundStatusOperationErrorNotification {
type: NotificationType.RefundStatusOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface RefundApplyOperationErrorNotification {
type: NotificationType.RefundApplyOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface PayOperationErrorNotification {
type: NotificationType.PayOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface ProposalOperationErrorNotification {
type: NotificationType.ProposalOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface TipOperationErrorNotification {
@@ -188,17 +188,17 @@ export interface TipOperationErrorNotification {
export interface WithdrawOperationErrorNotification {
type: NotificationType.WithdrawOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface RecoupOperationErrorNotification {
type: NotificationType.RecoupOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface ReserveOperationErrorNotification {
type: NotificationType.ReserveOperationError;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface ReserveCreatedNotification {
diff --git a/packages/taler-wallet-core/src/types/pending.ts b/packages/taler-wallet-core/src/types/pending.ts
index 67d243a37..23c736a57 100644
--- a/packages/taler-wallet-core/src/types/pending.ts
+++ b/packages/taler-wallet-core/src/types/pending.ts
@@ -21,7 +21,7 @@
/**
* Imports.
*/
-import { OperationErrorDetails, BalancesResponse } from "./walletTypes";
+import { TalerErrorDetails, BalancesResponse } from "./walletTypes";
import { WithdrawalSource, RetryInfo, ReserveRecordStatus } from "./dbTypes";
import { Timestamp, Duration } from "../util/time";
@@ -67,7 +67,7 @@ export interface PendingExchangeUpdateOperation {
stage: ExchangeUpdateOperationStage;
reason: string;
exchangeBaseUrl: string;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
/**
@@ -122,7 +122,7 @@ export interface PendingReserveOperation {
*/
export interface PendingRefreshOperation {
type: PendingOperationType.Refresh;
- lastError?: OperationErrorDetails;
+ lastError?: TalerErrorDetails;
refreshGroupId: string;
finishedPerCoin: boolean[];
retryInfo: RetryInfo;
@@ -137,7 +137,7 @@ export interface PendingProposalDownloadOperation {
proposalTimestamp: Timestamp;
proposalId: string;
orderId: string;
- lastError?: OperationErrorDetails;
+ lastError?: TalerErrorDetails;
retryInfo: RetryInfo;
}
@@ -182,7 +182,7 @@ export interface PendingPayOperation {
proposalId: string;
isReplay: boolean;
retryInfo: RetryInfo;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
/**
@@ -193,14 +193,14 @@ export interface PendingRefundQueryOperation {
type: PendingOperationType.RefundQuery;
proposalId: string;
retryInfo: RetryInfo;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
export interface PendingRecoupOperation {
type: PendingOperationType.Recoup;
recoupGroupId: string;
retryInfo: RetryInfo;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
}
/**
@@ -209,7 +209,7 @@ export interface PendingRecoupOperation {
export interface PendingWithdrawOperation {
type: PendingOperationType.Withdraw;
source: WithdrawalSource;
- lastError: OperationErrorDetails | undefined;
+ lastError: TalerErrorDetails | undefined;
retryInfo: RetryInfo;
withdrawalGroupId: string;
numCoinsWithdrawn: number;
diff --git a/packages/taler-wallet-core/src/types/transactions.ts b/packages/taler-wallet-core/src/types/transactions.ts
index 400439548..dce480830 100644
--- a/packages/taler-wallet-core/src/types/transactions.ts
+++ b/packages/taler-wallet-core/src/types/transactions.ts
@@ -42,7 +42,7 @@ import {
codecForList,
codecForAny,
} from "../util/codec";
-import { OperationErrorDetails } from "./walletTypes";
+import { TalerErrorDetails } from "./walletTypes";
export interface TransactionsRequest {
/**
@@ -86,7 +86,7 @@ export interface TransactionCommon {
// Amount added or removed from the wallet's balance (including all fees and other costs)
amountEffective: AmountString;
- error?: OperationErrorDetails;
+ error?: TalerErrorDetails;
}
export type Transaction =
diff --git a/packages/taler-wallet-core/src/types/walletTypes.ts b/packages/taler-wallet-core/src/types/walletTypes.ts
index eb7d878fa..3182d50bb 100644
--- a/packages/taler-wallet-core/src/types/walletTypes.ts
+++ b/packages/taler-wallet-core/src/types/walletTypes.ts
@@ -214,7 +214,7 @@ export interface ConfirmPayResultDone {
export interface ConfirmPayResultPending {
type: ConfirmPayResultType.Pending;
- lastError: OperationErrorDetails;
+ lastError: TalerErrorDetails;
}
export type ConfirmPayResult = ConfirmPayResultDone | ConfirmPayResultPending;
@@ -494,9 +494,9 @@ export interface WalletDiagnostics {
dbOutdated: boolean;
}
-export interface OperationErrorDetails {
- talerErrorCode: number;
- talerErrorHint: string;
+export interface TalerErrorDetails {
+ code: number;
+ hint: string;
message: string;
details: unknown;
}
@@ -816,7 +816,7 @@ export interface CoreApiResponseError {
type: "error";
operation: string;
id: string;
- error: OperationErrorDetails;
+ error: TalerErrorDetails;
}
export interface WithdrawTestBalanceRequest {