commit ac3a62fde6bae894ed842b1b013b134f8727737d
parent 4974a00dcd1ea933bbc8545ac2d798b870b853f9
Author: Florian Dold <dold@taler.net>
Date: Tue, 28 Jul 2026 19:56:50 +0200
util: add the WALLET_PURCHASE_NOT_FOUND error code
Regenerated from the GANA registry, which also brings in the merchant codes
2535-2539 and two description fixes added upstream since the last sync.
Issue: https://bugs.taler.net/n/10692
Diffstat:
2 files changed, 57 insertions(+), 5 deletions(-)
diff --git a/packages/taler-util/src/errors.ts b/packages/taler-util/src/errors.ts
@@ -55,6 +55,10 @@ export interface DetailsMap {
orderId: string;
claimUrl: string;
};
+ [TalerErrorCode.WALLET_PURCHASE_NOT_FOUND]: {
+ merchantBaseUrl: string;
+ orderId: string;
+ };
[TalerErrorCode.WALLET_ORDER_ALREADY_PAID]: {
orderId: string;
fulfillmentUrl: string | undefined;
diff --git a/packages/taler-util/src/taler-error-codes.ts b/packages/taler-util/src/taler-error-codes.ts
@@ -3561,7 +3561,7 @@ export enum TalerErrorCode {
/**
- * The amount to be refunded is inconsistent: either is lower than the previous amount being awarded, or it exceeds the original price paid by the customer.
+ * The requested cumulative Taler refund is inconsistent: it is lower than the amount already awarded, exceeds the amount paid through Taler, or would make the combined Taler and external refunds exceed the full order total.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
*/
@@ -3601,6 +3601,46 @@ export enum TalerErrorCode {
/**
+ * The order cannot be collected by the backend as it is not a genuinely free Taler payment: the Taler amount is not zero, or the selected choice has token inputs or outputs and thus requires a customer wallet.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ MERCHANT_PRIVATE_POST_ORDERS_ID_COLLECT_NOT_FREE = 2535,
+
+
+ /**
+ * The order cannot be collected by the backend as it was already claimed by a customer wallet. The wallet owns the order and must execute the free payment itself.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ MERCHANT_PRIVATE_POST_ORDERS_ID_COLLECT_ALREADY_CLAIMED = 2536,
+
+
+ /**
+ * The order provided to the backend could not be deleted as it has payments that were settled outside of Taler. Deletion requires an explicit force operation.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ MERCHANT_PRIVATE_DELETE_ORDERS_EXTERNALLY_PAID = 2537,
+
+
+ /**
+ * The external refund could not be recorded as the cumulative externally refunded amount would exceed the full order total minus the amount already refunded through Taler.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_EXTERNAL_INCONSISTENT_AMOUNT = 2538,
+
+
+ /**
+ * An external refund with the same identifier was already recorded for this order, but with different details.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_EXTERNAL_ALREADY_EXISTS = 2539,
+
+
+ /**
* The exchange says it does not know this transfer.
* Returned with an HTTP status code of #MHD_HTTP_BAD_GATEWAY (502).
* (A value of 0 indicates that the error is generated client-side).
@@ -4514,7 +4554,7 @@ export enum TalerErrorCode {
/**
* The provided signature is invalid.
- * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
* (A value of 0 indicates that the error is generated client-side).
*/
BANK_BAD_SIGNATURE = 5160,
@@ -5065,6 +5105,14 @@ export enum TalerErrorCode {
/**
+ * The wallet does not have a purchase for the requested order.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ WALLET_PURCHASE_NOT_FOUND = 7051,
+
+
+ /**
* We encountered a timeout with our payment backend.
* Returned with an HTTP status code of #MHD_HTTP_GATEWAY_TIMEOUT (504).
* (A value of 0 indicates that the error is generated client-side).
@@ -5794,7 +5842,7 @@ export enum TalerErrorCode {
/**
* The grant is unknown to the service (it could also have expired).
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
CHALLENGER_GRANT_UNKNOWN = 9753,
@@ -5802,7 +5850,7 @@ export enum TalerErrorCode {
/**
* The code given is not even well-formed.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE = 9754,
@@ -5810,7 +5858,7 @@ export enum TalerErrorCode {
/**
* The service is not aware of the referenced validation process.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
CHALLENGER_GENERIC_VALIDATION_UNKNOWN = 9755,