summaryrefslogtreecommitdiff
path: root/packages/taler-util/src/walletTypes.ts
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2022-03-22 21:16:38 +0100
committerFlorian Dold <florian@dold.me>2022-03-22 21:16:38 +0100
commit5d23eb36354d07508a015531f298b3e261bbafce (patch)
treefae0d2599c94d88c9264bb63a301adb1706824c1 /packages/taler-util/src/walletTypes.ts
parentf8d12f7b0d4af1b1769b89e80c87f9c169678564 (diff)
downloadwallet-core-5d23eb36354d07508a015531f298b3e261bbafce.tar.gz
wallet-core-5d23eb36354d07508a015531f298b3e261bbafce.tar.bz2
wallet-core-5d23eb36354d07508a015531f298b3e261bbafce.zip
wallet: improve error handling and error codes
Diffstat (limited to 'packages/taler-util/src/walletTypes.ts')
-rw-r--r--packages/taler-util/src/walletTypes.ts14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/taler-util/src/walletTypes.ts b/packages/taler-util/src/walletTypes.ts
index 3c4fa96c7..1f88c39ee 100644
--- a/packages/taler-util/src/walletTypes.ts
+++ b/packages/taler-util/src/walletTypes.ts
@@ -60,6 +60,7 @@ import {
import { OrderShortInfo, codecForOrderShortInfo } from "./transactionsTypes.js";
import { BackupRecovery } from "./backupTypes.js";
import { PaytoUri } from "./payto.js";
+import { TalerErrorCode } from "./taler-error-codes.js";
/**
* Response for the create reserve request to the wallet.
@@ -136,7 +137,7 @@ export interface ConfirmPayResultDone {
export interface ConfirmPayResultPending {
type: ConfirmPayResultType.Pending;
- lastError: TalerErrorDetails | undefined;
+ lastError: TalerErrorDetail | undefined;
}
export type ConfirmPayResult = ConfirmPayResultDone | ConfirmPayResultPending;
@@ -455,11 +456,10 @@ export interface WalletDiagnostics {
dbOutdated: boolean;
}
-export interface TalerErrorDetails {
- code: number;
- hint: string;
- message: string;
- details: unknown;
+export interface TalerErrorDetail {
+ code: TalerErrorCode;
+ hint?: string;
+ [x: string]: unknown;
}
/**
@@ -850,7 +850,7 @@ export interface CoreApiResponseError {
type: "error";
operation: string;
id: string;
- error: TalerErrorDetails;
+ error: TalerErrorDetail;
}
export interface WithdrawTestBalanceRequest {