commit 47c23e8aa1d7615a0b8d83d46211d0b28b8bf675
parent 2b6dfdeedd50787d9766690309ab93bbadba69ab
Author: Florian Dold <dold@taler.net>
Date: Fri, 7 Aug 2026 02:52:38 +0200
util: regenerate error codes from GANA
Adds the three codes the wallet needs to report an unconfirmed change of an
exchange's key set, and picks up the challenger and paivana codes the
generated file was stale on.
Issue: https://bugs.taler.net/n/8576
Diffstat:
1 file changed, 90 insertions(+), 6 deletions(-)
diff --git a/packages/taler-util/src/taler-error-codes.ts b/packages/taler-util/src/taler-error-codes.ts
@@ -4580,6 +4580,27 @@ export enum TalerErrorCode {
WALLET_EXCHANGE_SIGNATURE_INVALID = 7065,
/**
+ * The exchange presents a master public key or currency that the user has not accepted yet. The operation was refused.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ WALLET_EXCHANGE_KEYS_NOT_ACCEPTED = 7066,
+
+ /**
+ * The wallet was asked to accept or reject a change of the exchange's keys, but the exchange does not present a new key set.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ WALLET_EXCHANGE_NO_KEY_CHANGE_PENDING = 7067,
+
+ /**
+ * The key set that was confirmed is not the one that the exchange currently presents.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ WALLET_EXCHANGE_KEY_CHANGE_MISMATCH = 7068,
+
+ /**
* 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).
@@ -5196,7 +5217,7 @@ export enum TalerErrorCode {
TALDIR_REGISTER_RATE_LIMITED = 9601,
/**
- * The client is unknown or unauthorized.
+ * The service does not know a client with the given client identifier, or the given client secret does not match it. Used where no client has been authenticated yet.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
*/
@@ -5217,7 +5238,7 @@ export enum TalerErrorCode {
CHALLENGER_HELPER_EXEC_FAILED = 9752,
/**
- * The grant is unknown to the service (it could also have expired).
+ * The authorization grant is unknown to the service (it could also have been redeemed already or have expired).
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
@@ -5231,14 +5252,14 @@ export enum TalerErrorCode {
CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE = 9754,
/**
- * The service is not aware of the referenced validation process.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * The service is not aware of the referenced validation process, or it has expired.
+ * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
*/
CHALLENGER_GENERIC_VALIDATION_UNKNOWN = 9755,
/**
- * The code given is not valid.
+ * Deprecated, no longer returned by any endpoint. The value stays reserved and must not be reused. Was: the code given is not valid.
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
* (A value of 0 indicates that the error is generated client-side).
*/
@@ -5259,7 +5280,7 @@ export enum TalerErrorCode {
CHALLENGER_INVALID_PIN = 9758,
/**
- * The token cannot be valid as no address was ever provided by the client.
+ * Deprecated since protocol v8, no longer returned by any endpoint; see CHALLENGER_NO_CHALLENGE_TRANSMITTED. The value stays reserved and must not be reused. Was: the token cannot be valid as no address was ever provided by the client.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
*/
@@ -5273,6 +5294,62 @@ export enum TalerErrorCode {
CHALLENGER_CLIENT_FORBIDDEN_READ_ONLY = 9760,
/**
+ * No challenge was ever transmitted for this validation, so it cannot be solved yet. The user must provide their address first.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ CHALLENGER_NO_CHALLENGE_TRANSMITTED = 9761,
+
+ /**
+ * An address field does not match the regular expression configured for it. The detail names the offending field.
+ * 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_ADDRESS_RESTRICTION_VIOLATED = 9762,
+
+ /**
+ * The address restriction configured for this field is missing its regular expression or the expression failed to compile. This is a server misconfiguration.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ CHALLENGER_ADDRESS_RESTRICTION_MALFORMED = 9763,
+
+ /**
+ * The number of times the address may be changed for this validation has been exhausted. The user must request a fresh nonce from the client.
+ * Returned with an HTTP status code of #MHD_HTTP_TOO_MANY_REQUESTS (429).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ CHALLENGER_TOO_MANY_ADDRESS_CHANGES = 9764,
+
+ /**
+ * The number of times the challenge may be transmitted for this validation has been exhausted. The user may still try a different address if changes remain.
+ * Returned with an HTTP status code of #MHD_HTTP_TOO_MANY_REQUESTS (429).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ CHALLENGER_TOO_MANY_PIN_TRANSMISSIONS = 9765,
+
+ /**
+ * The number of attempts to enter the PIN has been exhausted. The user may still request a retransmission or change the address.
+ * Returned with an HTTP status code of #MHD_HTTP_TOO_MANY_REQUESTS (429).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ CHALLENGER_NO_PIN_ATTEMPTS_LEFT = 9766,
+
+ /**
+ * Authentication of the client failed: the client identifier and client secret presented do not match a registered client. Returned where the endpoint authenticates the client, so the reply challenges for credentials.
+ * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ CHALLENGER_CLIENT_AUTHENTICATION_FAILED = 9767,
+
+ /**
+ * The access token presented is malformed, unknown or expired. Malformed and unknown tokens are deliberately not distinguished.
+ * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ CHALLENGER_TOKEN_UNKNOWN = 9768,
+
+ /**
* The request is invalid as the specified order is unpaid. The client should only call this endpoint after paying the order.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
@@ -5336,6 +5413,13 @@ export enum TalerErrorCode {
PAIVANA_PAYWALL_DISABLED = 9808,
/**
+ * The website specified in the request is not acceptable for this backend. Somehow the client must have specified an invalid website which is not configured for this Paivana reverse proxy and thus not eligible as a target for the redirect. A developer should check how the client computed the fulfillment_url of the order and fix it.
+ * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ PAIVANA_INVALID_TARGET = 9809,
+
+ /**
* End of error code range.
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
* (A value of 0 indicates that the error is generated client-side).