commit d99e9f08c86b7687c6bec5f44df902c8ebd1f43e
parent 3f19a44c869b97622876c6a65583729c29cf3f4e
Author: Martin Schanzenbach <schanzen@gnunet.org>
Date: Thu, 16 Jul 2026 11:42:42 +0200
slightly improve error handling
Diffstat:
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/packages/taler-util/src/http-client/taldir.ts b/packages/taler-util/src/http-client/taldir.ts
@@ -20,6 +20,7 @@ import {
FailCasesByMethod,
HttpStatusCode,
LibtoolVersion,
+ OperationAlternative,
OperationFail,
OperationOk,
PaymentResponse,
diff --git a/packages/taler-wallet-core/src/taldir.ts b/packages/taler-wallet-core/src/taldir.ts
@@ -31,6 +31,8 @@ import {
TaldirRegistrationResponse,
TaldirRegistrationCompletionRequest,
EmptyObject,
+ TalerError,
+ TalerErrorCode,
} from "@gnu-taler/taler-util";
import { WalletExecutionContext } from "./wallet.js";
@@ -153,7 +155,7 @@ export async function completeAliasRegistration(
case HttpStatusCode.NotFound:
throw Error("taldir reported that this registration was not found");
case HttpStatusCode.Forbidden:
- throw Error("taldir reported that the solution was incorrect");
+ throw TalerError.fromDetail(TalerErrorCode.GENERIC_FORBIDDEN, {});
case HttpStatusCode.TooManyRequests:
throw Error("taldir reported that too many tries have been made to solve this registration challenge");
default: