taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 3b2a424d503e2173e69ed524f225e4468203ccb6
parent 9eddb34acb915613d33cb26430bb2f20074f141b
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date:   Sat, 24 Oct 2026 10:47:23 +0200

mailbox/taldir: fix ftbfs for gana changes

Diffstat:
Mpackages/taler-util/src/errors.ts | 2+-
Mpackages/taler-wallet-core/src/taldir.ts | 16++++++++--------
Mpackages/taler-wallet-core/src/wallet-api-types.ts | 11+++++++----
3 files changed, 16 insertions(+), 13 deletions(-)

diff --git a/packages/taler-util/src/errors.ts b/packages/taler-util/src/errors.ts @@ -332,7 +332,7 @@ export interface DetailsMap { [TalerErrorCode.WALLET_MAILBOX_UNAVAILABLE]: { mailboxBaseUrl?: string; }; - [TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED]: { + [TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE]: { directoryBaseUrl?: string; }; [TalerErrorCode.WALLET_CONTRACT_TERMS_UNSUPPORTED]: empty; diff --git a/packages/taler-wallet-core/src/taldir.ts b/packages/taler-wallet-core/src/taldir.ts @@ -93,7 +93,7 @@ async function internalGetSupportedAliases( } default: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: lookupRequest.taldirBaseUrl }, "could not read the configuration of the directory service", ); @@ -145,7 +145,7 @@ async function internalLookupAlias( } default: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: lookupRequest.taldirBaseUrl }, "could not read the configuration of the directory service", ); @@ -170,7 +170,7 @@ async function internalLookupAlias( }; default: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: lookupRequest.taldirBaseUrl }, "the directory service did not answer the alias lookup", ); @@ -217,13 +217,13 @@ async function internalRegisterAlias( return res.body; case HttpStatusCode.NotFound: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: registerRequest.taldirBaseUrl }, `the directory service does not support the alias type "${registerRequest.aliasType}"`, ); default: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: registerRequest.taldirBaseUrl }, "the directory service did not accept the registration request", ); @@ -281,7 +281,7 @@ async function internalCompleteAliasRegistration( return {}; case HttpStatusCode.NotFound: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: completionRequest.taldirBaseUrl }, "the directory service does not know this registration, it may have expired", ); @@ -293,13 +293,13 @@ async function internalCompleteAliasRegistration( ); case HttpStatusCode.TooManyRequests: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: completionRequest.taldirBaseUrl }, "too many attempts have been made to answer this registration challenge", ); default: throw TalerError.fromDetail( - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, { directoryBaseUrl: completionRequest.taldirBaseUrl }, "the directory service did not accept the registration", ); diff --git a/packages/taler-wallet-core/src/wallet-api-types.ts b/packages/taler-wallet-core/src/wallet-api-types.ts @@ -2099,17 +2099,20 @@ export const walletApiExpectedErrors = { TalerErrorCode.WALLET_MAILBOX_UNAVAILABLE, ], [WalletApiOperation.RegisterAlias]: [ - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, + TalerErrorCode.WALLET_DIRECTORY_ALIAS_NOT_SUPPORTED, ], [WalletApiOperation.CompleteRegisterAlias]: [ - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, + TalerErrorCode.WALLET_DIRECTORY_ALIAS_SOLUTION_UNKNOWN, + TalerErrorCode.WALLET_DIRECTORY_ALIAS_SOLUTION_INCORRECT, TalerErrorCode.GENERIC_FORBIDDEN, ], [WalletApiOperation.LookupAlias]: [ - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, ], [WalletApiOperation.GetSupportedAliasTypes]: [ - TalerErrorCode.WALLET_ALIAS_REGISTRATION_FAILED, + TalerErrorCode.WALLET_DIRECTORY_UNAVAILABLE, ], // --- Database maintenance -----------------------------------------------