taler-android

Android apps for GNU Taler (wallet, PoS, cashier)
Log | Files | Refs | README | LICENSE

commit 4fb751fee6b0c6cb6c1d09ff6277b5aa1f67c738
parent 0c97d7f493560f70797759d3ebd414374124b8d8
Author: Iván Ávalos <avalos@disroot.org>
Date:   Mon, 19 Oct 2026 15:03:00 +0200

[wallet] update GANA error registry

Diffstat:
Mwallet/src/main/java/net/taler/wallet/backend/TalerErrorCode.kt | 902+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 674 insertions(+), 228 deletions(-)

diff --git a/wallet/src/main/java/net/taler/wallet/backend/TalerErrorCode.kt b/wallet/src/main/java/net/taler/wallet/backend/TalerErrorCode.kt @@ -25,11 +25,11 @@ package net.taler.wallet.backend import kotlinx.serialization.ExperimentalSerializationApi import kotlinx.serialization.KSerializer import kotlinx.serialization.Serializable -import kotlinx.serialization.Serializer import kotlinx.serialization.descriptors.PrimitiveKind import kotlinx.serialization.descriptors.PrimitiveSerialDescriptor import kotlinx.serialization.encoding.Decoder import kotlinx.serialization.encoding.Encoder +import kotlin.enums.enumEntries @Serializable(TalerErrorCodeSerializer::class) enum class TalerErrorCode(val code: Int) { @@ -41,13 +41,151 @@ enum class TalerErrorCode(val code: Int) { /** An error response did not include an error code in the format expected by the client. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server. */ INVALID(1), - /** The response we got from the server was not in the expected format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server. */ + /** An internal failure occurred on the client side. Details should be in the local logs. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_CLIENT_INTERNAL_ERROR(2), + + /** The client does not support the protocol version advertised by the server. */ + GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION(3), + + /** The response received from the server was not in the expected format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and the network connection to the server. */ GENERIC_INVALID_RESPONSE(10), + /** The operation timed out. Trying again might help. Check the network connection. */ + GENERIC_TIMEOUT(11), + + /** The protocol version given by the server does not follow the required format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server. */ + GENERIC_VERSION_MALFORMED(12), + + /** The service returned a response in the correct data format, but its content did not satisfy the protocol. File a bug report. */ + GENERIC_REPLY_MALFORMED(13), + + /** There is an error in the client-side configuration, for example an option is set to an invalid value. Check the logs and fix the local configuration. */ + GENERIC_CONFIGURATION_INVALID(14), + + /** The client made a request to a service, but received an error response it does not know how to handle. Please file a bug report. */ + GENERIC_UNEXPECTED_REQUEST_ERROR(15), + + /** The token used by the client to authorize the request does not grant the required permissions for the request. Check the requirements and obtain a suitable authorization token to proceed. */ + GENERIC_TOKEN_PERMISSION_INSUFFICIENT(16), + + /** The HTTP method used is invalid for this endpoint. This is likely a bug in the client implementation. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_METHOD_INVALID(20), + + /** There is no endpoint defined for the URL provided by the client. Check whether the URL is correct or file a report with the client software developers. */ + GENERIC_ENDPOINT_UNKNOWN(21), + + /** The JSON in the client's request was malformed. This is likely a bug in the client implementation. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_JSON_INVALID(22), + + /** Some of the HTTP headers provided by the client were malformed, so the server could not handle the request. This is likely a bug in the client implementation. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_HTTP_HEADERS_MALFORMED(23), + + /** The `payto://` URI provided by the client is malformed. Check that it uses the syntax specified by RFC 8905 and that the bank account number is correct. */ + GENERIC_PAYTO_URI_MALFORMED(24), + + /** A required parameter in the request was missing. This is likely a bug in the client implementation. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_PARAMETER_MISSING(25), + + /** A parameter in the request was malformed. This is likely a bug in the client implementation. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_PARAMETER_MALFORMED(26), + + /** The reserve public key was malformed. */ + GENERIC_RESERVE_PUB_MALFORMED(27), + + /** The body in the request could not be decompressed by the server. This is likely a bug in the client implementation. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_COMPRESSION_INVALID(28), + + /** A segment in the path of the URL provided by the client is malformed. Check that the URL uses the correct encoding. */ + GENERIC_PATH_SEGMENT_MALFORMED(29), + + /** The currency involved in the operation is not acceptable for this server. Check the configuration and ensure that the currency specified for the service provider is supported by that provider. */ + GENERIC_CURRENCY_MISMATCH(30), + + /** The URI is longer than the longest URI the HTTP server is willing to parse. If this was a legitimate request, the server administrator or software developers may need to increase the limit. */ + GENERIC_URI_TOO_LONG(31), + + /** The body is too large for the endpoint. If this was a legitimate request, the server administrator or software developers may need to increase the limit. */ + GENERIC_UPLOAD_EXCEEDS_LIMIT(32), + + /** A parameter that must not be present was included in the request. This is likely a bug in the client implementation. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_PARAMETER_EXTRA(33), + + /** The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner. */ + GENERIC_UNAUTHORIZED(40), + + /** The service refused the request because the given authorization token is unknown. The client should request a valid access token from the account owner. */ + GENERIC_TOKEN_UNKNOWN(41), + + /** The service refused the request because the given authorization token expired. The client should request a fresh authorization token from the account owner. */ + GENERIC_TOKEN_EXPIRED(42), + + /** The service refused the request because the given authorization token is invalid or malformed. The client should check that it has the correct credentials. */ + GENERIC_TOKEN_MALFORMED(43), + + /** The service refused the request because the client lacks the required rights on the resource. The client may need different credentials to perform this operation. */ + GENERIC_FORBIDDEN(44), + + /** The service failed to initialize its connection to the database. The system administrator should check that the service has permission to access the database and that the database is running. */ + GENERIC_DB_SETUP_FAILED(50), + + /** The service encountered an error while starting the database transaction. The system administrator should check that the database is running. */ + GENERIC_DB_START_FAILED(51), + + /** The service failed to store information in its database. The system administrator should check that the database is running and review the service logs. */ + GENERIC_DB_STORE_FAILED(52), + + /** The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs. */ + GENERIC_DB_FETCH_FAILED(53), + + /** The service encountered an unrecoverable error trying to commit a transaction to the database. The system administrator should check that the database is running and review the service logs. */ + GENERIC_DB_COMMIT_FAILED(54), + + /** The service encountered an error while committing the database transaction; despite repeated retries, a conflicting transaction persisted. This indicates a serialization error. It may be caused by conflicting concurrent transactions or a missing index. Check that the latest available version is being used and file a report with the developers if the problem persists. */ + GENERIC_DB_SOFT_FAILURE(55), + + /** The service's database is inconsistent and violates service-internal invariants. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_DB_INVARIANT_FAILURE(56), + + /** The HTTP server experienced an internal invariant failure (bug). Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_INTERNAL_INVARIANT_FAILURE(60), + + /** The service could not compute a cryptographic hash over a JSON value. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_FAILED_COMPUTE_JSON_HASH(61), + + /** The service could not compute an amount. Check whether the latest available version is in use or file a report with the developers. */ + GENERIC_FAILED_COMPUTE_AMOUNT(62), + + /** The HTTP server had insufficient memory to parse the request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ + GENERIC_PARSER_OUT_OF_MEMORY(70), + + /** The HTTP server failed to allocate memory. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ + GENERIC_ALLOCATION_FAILURE(71), + + /** The HTTP server failed to allocate memory for building a JSON response. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Ask the system administrator to investigate. */ + GENERIC_JSON_ALLOCATION_FAILURE(72), + + /** The HTTP server failed to allocate memory for making a CURL request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ + GENERIC_CURL_ALLOCATION_FAILURE(73), + + /** The backend could not locate a required template to generate an HTML response. The system administrator should check whether the resource files are installed in the correct location and readable by the service. */ + GENERIC_FAILED_TO_LOAD_TEMPLATE(74), + + /** The backend could not expand the template to generate an HTML response. The system administrator should investigate the logs and check whether the templates are well-formed. */ + GENERIC_FAILED_TO_EXPAND_TEMPLATE(75), + + /** The requested feature is not implemented by the server. The system administrator of the server may try to update the software or build it with other options to enable the feature. */ + GENERIC_FEATURE_NOT_IMPLEMENTED(76), + + /** The operating system failed to allocate required resources. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ + GENERIC_OS_RESOURCE_ALLOCATION_FAILURE(77), + + /** The requested content type is not supported by the server. The client should try requesting a different format. */ + GENERIC_REQUESTED_FORMAT_UNSUPPORTED(78), + /** Exchange is badly configured and thus cannot operate. */ EXCHANGE_GENERIC_BAD_CONFIGURATION(1000), - /** Operation specified unknown for this endpoint. */ + /** The specified operation is unknown for this endpoint. */ EXCHANGE_GENERIC_OPERATION_UNKNOWN(1001), /** The number of segments included in the URI does not match the number of segments expected by the endpoint. */ @@ -56,7 +194,7 @@ enum class TalerErrorCode(val code: Int) { /** The same coin was already used with a different denomination previously. */ EXCHANGE_GENERIC_COIN_CONFLICTING_DENOMINATION_KEY(1003), - /** The public key of given to a \"/coins/\" endpoint of the exchange was malformed. */ + /** The public key given to the `/coins/` endpoint of the exchange was malformed. */ EXCHANGE_GENERIC_COINS_INVALID_COIN_PUB(1004), /** The exchange is not aware of the denomination key the wallet requested for the operation. */ @@ -71,7 +209,7 @@ enum class TalerErrorCode(val code: Int) { /** Validity period of the denomination lies in the future. */ EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE(1008), - /** Denomination key of the coin is past its expiration time for the requested operation. */ + /** The denomination key of the coin has passed its expiration time for the requested operation. */ EXCHANGE_GENERIC_DENOMINATION_EXPIRED(1009), /** Denomination key of the coin has been revoked. */ @@ -80,7 +218,7 @@ enum class TalerErrorCode(val code: Int) { /** An operation where the exchange interacted with a security module timed out. */ EXCHANGE_GENERIC_SECMOD_TIMEOUT(1011), - /** The respective coin did not have sufficient residual value for the operation. The \"history\" in this response provides the \"residual_value\" of the coin, which may be less than its \"original_value\". */ + /** The coin did not have sufficient residual value for the operation. The `history` in this response provides the coin's `residual_value`, which may be less than its `original_value`. */ EXCHANGE_GENERIC_INSUFFICIENT_FUNDS(1012), /** The exchange had an internal error reconstructing the transaction history of the coin that was being processed. */ @@ -125,16 +263,16 @@ enum class TalerErrorCode(val code: Int) { /** The purse has expired. */ EXCHANGE_GENERIC_PURSE_EXPIRED(1026), - /** The exchange has no information about the \"reserve_pub\" that was given. */ + /** The exchange has no information about the `reserve_pub` that was provided. */ EXCHANGE_GENERIC_RESERVE_UNKNOWN(1027), /** The exchange is not allowed to proceed with the operation until the client has satisfied a KYC check. */ EXCHANGE_GENERIC_KYC_REQUIRED(1028), - /** Inconsistency between provided age commitment and attest: either none or both must be provided */ + /** The provided age commitment and attestation are inconsistent: either both must be provided or neither may be provided. */ EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT(1029), - /** The provided attestation for the minimum age couldn't be verified by the exchange. */ + /** The provided attestation for the minimum age could not be verified by the exchange. */ EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE(1030), /** The purse was deleted. */ @@ -167,46 +305,64 @@ enum class TalerErrorCode(val code: Int) { /** The specified fallback measure for a KYC operation is unknown. This is a bug. Users should contact the exchange operator. */ EXCHANGE_GENERIC_KYC_FALLBACK_UNKNOWN(1040), - /** The exchange is not aware of the bank account (payto URI or hash thereof) specified in the request and thus cannot perform the requested operation. The client should check that the select account is correct. */ + /** The exchange is not aware of the bank account (payto URI or hash thereof) specified in the request and thus cannot perform the requested operation. The client should check that the selected account is correct. */ EXCHANGE_GENERIC_BANK_ACCOUNT_UNKNOWN(1041), /** The AML processing at the exchange did not terminate in an adequate timeframe. This is likely a configuration problem at the payment service provider. Users should contact the exchange operator. */ EXCHANGE_GENERIC_AML_PROGRAM_RECURSION_DETECTED(1042), - /** A check against sanction lists failed. This is indicative of an internal error in the sanction list processing logic. This needs to be investigated by the exchange operator. */ + /** A check against sanctions lists failed. This indicates an internal error in the sanctions-list processing logic. The exchange operator should investigate. */ EXCHANGE_GENERIC_KYC_SANCTION_LIST_CHECK_FAILED(1043), - /** The operation timed out. Trying again might help. Check the network connection. */ - GENERIC_TIMEOUT(11), + /** The process to generate a PDF from a template failed. A likely cause is a syntactic error in the template. This needs to be investigated by the exchange operator. */ + EXCHANGE_GENERIC_TYPST_TEMPLATE_FAILURE(1044), + + /** A process to combine multiple PDFs into one larger document failed. A likely cause is a resource exhaustion problem on the server. This needs to be investigated by the exchange operator. */ + EXCHANGE_GENERIC_PDFTK_FAILURE(1045), + + /** The process to generate a PDF from a template crashed. A likely cause is a bug in the Typst software. This needs to be investigated by the exchange operator. */ + EXCHANGE_GENERIC_TYPST_CRASH(1046), + + /** The process to combine multiple PDFs into a larger document crashed. A likely cause is a bug in the pdftk software. This needs to be investigated by the exchange operator. */ + EXCHANGE_GENERIC_PDFTK_CRASH(1047), + + /** One of the binaries needed to generate the PDF is not installed. If this feature is required, the system administrator should make sure Typst and pdftk are both installed. */ + EXCHANGE_GENERIC_NO_TYPST_OR_PDFTK(1048), + + /** The exchange is not aware of the given target account. The specified account is not a customer of this service. */ + EXCHANGE_GENERIC_TARGET_ACCOUNT_UNKNOWN(1049), + + /** The specified AML officer does not have write access at this time. */ + EXCHANGE_GENERIC_AML_OFFICER_READ_ONLY(1050), /** The exchange did not find information about the specified transaction in the database. */ EXCHANGE_DEPOSITS_GET_NOT_FOUND(1100), - /** The wire hash of given to a \"/deposits/\" handler was malformed. */ + /** The wire hash given to the `/deposits/` handler was malformed. */ EXCHANGE_DEPOSITS_GET_INVALID_H_WIRE(1101), - /** The merchant key of given to a \"/deposits/\" handler was malformed. */ + /** The merchant key given to the `/deposits/` handler was malformed. */ EXCHANGE_DEPOSITS_GET_INVALID_MERCHANT_PUB(1102), - /** The hash of the contract terms given to a \"/deposits/\" handler was malformed. */ + /** The hash of the contract terms given to the `/deposits/` handler was malformed. */ EXCHANGE_DEPOSITS_GET_INVALID_H_CONTRACT_TERMS(1103), - /** The coin public key of given to a \"/deposits/\" handler was malformed. */ + /** The coin public key given to the `/deposits/` handler was malformed. */ EXCHANGE_DEPOSITS_GET_INVALID_COIN_PUB(1104), - /** The signature returned by the exchange in a /deposits/ request was malformed. */ + /** The signature returned by the exchange in a `/deposits/` request was malformed. */ EXCHANGE_DEPOSITS_GET_INVALID_SIGNATURE_BY_EXCHANGE(1105), /** The signature of the merchant is invalid. */ EXCHANGE_DEPOSITS_GET_MERCHANT_SIGNATURE_INVALID(1106), - /** The provided policy data was not accepted */ + /** The provided policy data was not accepted. */ EXCHANGE_DEPOSITS_POLICY_NOT_ACCEPTED(1107), - /** The given reserve does not have sufficient funds to admit the requested withdraw operation at this time. The response includes the current \"balance\" of the reserve as well as the transaction \"history\" that lead to this balance. */ + /** The given reserve does not have sufficient funds to admit the requested withdrawal operation at this time. The response includes the current `balance` of the reserve and the transaction `history` that led to this balance. */ EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS(1150), - /** The given reserve does not have sufficient funds to admit the requested age-withdraw operation at this time. The response includes the current \"balance\" of the reserve as well as the transaction \"history\" that lead to this balance. */ + /** The given reserve does not have sufficient funds to admit the requested age-withdrawal operation at this time. The response includes the current `balance` of the reserve and the transaction `history` that led to this balance. */ EXCHANGE_AGE_WITHDRAW_INSUFFICIENT_FUNDS(1151), /** The amount to withdraw together with the fee exceeds the numeric range for Taler amounts. This is not a client failure, as the coin value and fees come from the exchange's configuration. */ @@ -218,7 +374,7 @@ enum class TalerErrorCode(val code: Int) { /** The signature of the reserve is not valid. */ EXCHANGE_WITHDRAW_RESERVE_SIGNATURE_INVALID(1154), - /** When computing the reserve history, we ended up with a negative overall balance, which should be impossible. */ + /** Computing the reserve history resulted in a negative overall balance, which should be impossible. */ EXCHANGE_RESERVE_HISTORY_ERROR_INSUFFICIENT_FUNDS(1155), /** The reserve did not have sufficient funds in it to pay for a full reserve history statement. */ @@ -242,17 +398,17 @@ enum class TalerErrorCode(val code: Int) { /** The total sum of value and fees from the denominations differs from the committed amount with fees. */ EXCHANGE_AGE_WITHDRAW_AMOUNT_INCORRECT(1163), - /** The original commitment differs from the calculated hash */ + /** The original commitment differs from the calculated hash. */ EXCHANGE_WITHDRAW_REVEAL_INVALID_HASH(1164), - /** The maximum age in the commitment is too large for the reserve */ + /** The maximum age in the commitment is too large for the reserve. */ EXCHANGE_WITHDRAW_MAXIMUM_AGE_TOO_LARGE(1165), - /** The batch withdraw included a planchet that was already withdrawn. This is not allowed. */ - EXCHANGE_WITHDRAW_IDEMPOTENT_PLANCHET(1175), + /** The denominations of an age-restricted withdraw request do not all use the same age mask. All denominations of an age-restricted withdraw must have the same age groups. */ + EXCHANGE_WITHDRAW_AGE_MASK_MISMATCH(1166), - /** The protocol version given by the server does not follow the required format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server. */ - GENERIC_VERSION_MALFORMED(12), + /** The withdraw operation included the same planchet more than once. This is not allowed. */ + EXCHANGE_WITHDRAW_IDEMPOTENT_PLANCHET(1175), /** The signature made by the coin over the deposit permission is not valid. */ EXCHANGE_DEPOSIT_COIN_SIGNATURE_INVALID(1205), @@ -266,10 +422,10 @@ enum class TalerErrorCode(val code: Int) { /** The stated refund deadline is after the wire deadline. */ EXCHANGE_DEPOSIT_REFUND_DEADLINE_AFTER_WIRE_DEADLINE(1208), - /** The stated wire deadline is \"never\", which makes no sense. */ + /** The stated wire deadline is `never`, which is not allowed. */ EXCHANGE_DEPOSIT_WIRE_DEADLINE_IS_NEVER(1209), - /** The exchange failed to canonicalize and hash the given wire format. For example, the merchant failed to provide the \"salt\" or a valid payto:// URI in the wire details. Note that while the exchange will do some basic sanity checking on the wire details, it cannot warrant that the banking system will ultimately be able to route to the specified address, even if this check passed. */ + /** The exchange failed to canonicalize and hash the given wire format. For example, the merchant failed to provide the `salt` or a valid `payto://` URI in the wire details. Note that the exchange performs only basic sanity checking on the wire details; it cannot guarantee that the banking system can route funds to the specified address, even if this check succeeds. */ EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_JSON(1210), /** The hash of the given wire address does not match the wire hash specified in the proposal data. */ @@ -290,16 +446,13 @@ enum class TalerErrorCode(val code: Int) { /** The reserve history was requested with a bad signature. */ EXCHANGE_RESERVE_HISTORY_BAD_SIGNATURE(1252), - /** The service responded with a reply that was in the right data format, but the content did not satisfy the protocol. Please file a bug report. */ - GENERIC_REPLY_MALFORMED(13), - /** The exchange encountered melt fees exceeding the melted coin's contribution. */ EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION(1302), /** The signature made with the coin to be melted is invalid. */ EXCHANGE_MELT_COIN_SIGNATURE_INVALID(1303), - /** The denomination of the given coin has past its expiration date and it is also not a valid zombie (that is, was not refreshed with the fresh coin being subjected to recoup). */ + /** The denomination of the given coin has passed its expiration date and is not a valid zombie (that is, it was not refreshed with the fresh coin being subjected to recoup). */ EXCHANGE_MELT_COIN_EXPIRED_NO_ZOMBIE(1305), /** The signature returned by the exchange in a melt request was malformed. */ @@ -329,10 +482,10 @@ enum class TalerErrorCode(val code: Int) { /** The signature made with the coin over the link data is invalid. */ EXCHANGE_REFRESHES_REVEAL_LINK_SIGNATURE_INVALID(1361), - /** The refresh session hash given to a /refreshes/ handler was malformed. */ + /** The refresh session hash given to the `/refreshes/` handler was malformed. */ EXCHANGE_REFRESHES_REVEAL_INVALID_RCH(1362), - /** Operation specified invalid for this endpoint. */ + /** The specified operation is invalid for this endpoint. */ EXCHANGE_REFRESHES_REVEAL_OPERATION_INVALID(1363), /** The client provided age commitment data, but age restriction is not supported on this server. */ @@ -341,13 +494,10 @@ enum class TalerErrorCode(val code: Int) { /** The client provided invalid age commitment data: missing, not an array, or array of invalid size. */ EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_COMMITMENT_INVALID(1365), - /** There is an error in the client-side configuration, for example an option is set to an invalid value. Check the logs and fix the local configuration. */ - GENERIC_CONFIGURATION_INVALID(14), - /** The coin specified in the link request is unknown to the exchange. */ EXCHANGE_LINK_COIN_UNKNOWN(1400), - /** The public key of given to a /transfers/ handler was malformed. */ + /** The public key given to the `/transfers/` handler was malformed. */ EXCHANGE_TRANSFERS_GET_WTID_MALFORMED(1450), /** The exchange did not find information about the specified wire transfer identifier in the database. */ @@ -365,19 +515,16 @@ enum class TalerErrorCode(val code: Int) { /** The signature on the purse status returned by the exchange was invalid. */ EXCHANGE_PURSES_GET_INVALID_SIGNATURE_BY_EXCHANGE(1476), - /** The client made a request to a service, but received an error response it does not know how to handle. Please file a bug report. */ - GENERIC_UNEXPECTED_REQUEST_ERROR(15), - - /** The exchange knows literally nothing about the coin we were asked to refund. But without a transaction history, we cannot issue a refund. This is kind-of OK, the owner should just refresh it directly without executing the refund. */ + /** The exchange has no information about the coin to be refunded. Without a transaction history, it cannot issue a refund. This is acceptable; the owner should refresh the coin directly without executing the refund. */ EXCHANGE_REFUND_COIN_NOT_FOUND(1500), - /** We could not process the refund request as the coin's transaction history does not permit the requested refund because then refunds would exceed the deposit amount. The \"history\" in the response proves this. */ + /** The refund request could not be processed because the coin's transaction history does not permit it: the refunds would exceed the deposit amount. The `history` in the response demonstrates this. */ EXCHANGE_REFUND_CONFLICT_DEPOSIT_INSUFFICIENT(1501), - /** The exchange knows about the coin we were asked to refund, but not about the specific /deposit operation. Hence, we cannot issue a refund (as we do not know if this merchant public key is authorized to do a refund). */ + /** The exchange knows about the coin to be refunded, but not about the specific `/deposit` operation. Therefore, it cannot issue a refund because it does not know whether this merchant public key is authorized to issue one. */ EXCHANGE_REFUND_DEPOSIT_NOT_FOUND(1502), - /** The exchange can no longer refund the customer/coin as the money was already transferred (paid out) to the merchant. (It should be past the refund deadline.) */ + /** The exchange can no longer refund the customer or coin because the money was already transferred to the merchant. The refund deadline has passed. */ EXCHANGE_REFUND_MERCHANT_ALREADY_PAID(1503), /** The refund fee specified for the request is lower than the refund fee charged by the exchange for the given denomination key of the refunded coin. */ @@ -419,6 +566,15 @@ enum class TalerErrorCode(val code: Int) { /** The coin's denomination has not been revoked yet. */ EXCHANGE_RECOUP_NOT_ELIGIBLE(1555), + /** The number of coins in the recoup request does not match the number of coins signed in the withdraw operation. */ + EXCHANGE_RECOUP_WITHDRAW_BATCH_SIZE_MISMATCH(1556), + + /** The hash over the coins in the recoup request does not match the commitment of the withdraw operation. At least one disclosed coin was not part of the operation. */ + EXCHANGE_RECOUP_WITHDRAW_COMMITMENT_MISMATCH(1557), + + /** The denomination of a disclosed coin differs from the denomination recorded for that position of the withdraw operation. */ + EXCHANGE_RECOUP_WITHDRAW_DENOMINATION_MISMATCH(1558), + /** The given coin signature is invalid for the request. */ EXCHANGE_RECOUP_REFRESH_SIGNATURE_INVALID(1575), @@ -431,16 +587,22 @@ enum class TalerErrorCode(val code: Int) { /** The coin's denomination has not been revoked yet. */ EXCHANGE_RECOUP_REFRESH_NOT_ELIGIBLE(1580), - /** The token used by the client to authorize the request does not grant the required permissions for the request. Check the requirements and obtain a suitable authorization token to proceed. */ - GENERIC_TOKEN_PERMISSION_INSUFFICIENT(16), + /** The number of coins in the recoup request does not match the number of coins signed in the refresh operation. */ + EXCHANGE_RECOUP_REFRESH_BATCH_SIZE_MISMATCH(1581), + + /** The hash over the coins in the recoup request does not match the commitment of the refresh operation. At least one disclosed coin was not part of the operation. */ + EXCHANGE_RECOUP_REFRESH_COMMITMENT_MISMATCH(1582), - /** This exchange does not allow clients to request /keys for times other than the current (exchange) time. */ + /** The denomination of a disclosed coin differs from the denomination recorded for that position of the refresh operation. */ + EXCHANGE_RECOUP_REFRESH_DENOMINATION_MISMATCH(1583), + + /** This exchange does not allow clients to request `/keys` for times other than the current exchange time. */ EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN(1600), /** A signature in the server's response was malformed. */ EXCHANGE_WIRE_SIGNATURE_INVALID(1650), - /** No bank accounts are enabled for the exchange. The administrator should enable-account using the taler-exchange-offline tool. */ + /** No bank accounts are enabled for the exchange. The administrator should enable an account using the `taler-exchange-offline` tool. */ EXCHANGE_WIRE_NO_ACCOUNTS_CONFIGURED(1651), /** The payto:// URI stored in the exchange database for its bank account is malformed. */ @@ -449,10 +611,10 @@ enum class TalerErrorCode(val code: Int) { /** No wire fees are configured for an enabled wire method of the exchange. The administrator must set the wire-fee using the taler-exchange-offline tool. */ EXCHANGE_WIRE_FEES_NOT_CONFIGURED(1653), - /** This purse was previously created with different meta data. */ + /** This purse was previously created with different metadata. */ EXCHANGE_RESERVES_PURSE_CREATE_CONFLICTING_META_DATA(1675), - /** This purse was previously merged with different meta data. */ + /** This purse was previously merged with different metadata. */ EXCHANGE_RESERVES_PURSE_MERGE_CONFLICTING_META_DATA(1676), /** The reserve has insufficient funds to create another purse. */ @@ -479,7 +641,7 @@ enum class TalerErrorCode(val code: Int) { /** The helper refuses to sign with the key, because it is too early: the validity period has not yet started. */ EXCHANGE_DENOMINATION_HELPER_TOO_EARLY(1702), - /** The signature of the exchange on the reply was invalid. */ + /** The exchange's signature on the response was invalid. */ EXCHANGE_PURSE_DEPOSIT_EXCHANGE_SIGNATURE_INVALID(1725), /** The exchange failed to talk to the process responsible for its private signing keys. */ @@ -491,6 +653,9 @@ enum class TalerErrorCode(val code: Int) { /** The helper refuses to sign with the key, because it is too early: the validity period has not yet started. */ EXCHANGE_SIGNKEY_HELPER_TOO_EARLY(1752), + /** The signatures from the master exchange public key are missing, thus the exchange cannot currently sign its API responses. The exchange operator must use taler-exchange-offline to sign the current key material. */ + EXCHANGE_SIGNKEY_HELPER_OFFLINE_MISSING(1753), + /** The purse expiration time is in the past at the time of its creation. */ EXCHANGE_RESERVES_PURSE_EXPIRATION_BEFORE_NOW(1775), @@ -503,13 +668,16 @@ enum class TalerErrorCode(val code: Int) { /** The signature by the reserve affirming the merge is invalid. */ EXCHANGE_RESERVES_RESERVE_MERGE_SIGNATURE_INVALID(1778), + /** The purse expiration time is further in the future than the exchange allows. */ + EXCHANGE_RESERVES_PURSE_EXPIRATION_TOO_LATE(1779), + /** The signature by the reserve affirming the open operation is invalid. */ EXCHANGE_RESERVES_OPEN_BAD_SIGNATURE(1785), /** The signature by the reserve affirming the close operation is invalid. */ EXCHANGE_RESERVES_CLOSE_BAD_SIGNATURE(1786), - /** The signature by the reserve affirming the attestion request is invalid. */ + /** The signature by the reserve affirming the attestation request is invalid. */ EXCHANGE_RESERVES_ATTEST_BAD_SIGNATURE(1787), /** The exchange does not know an origin account to which the remaining reserve balance could be wired to, and the wallet failed to provide one. */ @@ -518,6 +686,12 @@ enum class TalerErrorCode(val code: Int) { /** The reserve balance is insufficient to pay for the open operation. */ EXCHANGE_RESERVES_OPEN_INSUFFICIENT_FUNDS(1789), + /** A coin signature for a deposit to pay to open the reserve is invalid. */ + EXCHANGE_RESERVES_OPEN_COIN_SIGNATURE_INVALID(1790), + + /** A different request to keep the reserve open was already processed with the same request timestamp. Each open request of a reserve must use a distinct request timestamp. */ + EXCHANGE_RESERVES_OPEN_TIMESTAMP_REUSE(1791), + /** The auditor that was supposed to be disabled is unknown to this exchange. */ EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND(1800), @@ -584,7 +758,7 @@ enum class TalerErrorCode(val code: Int) { /** There is a more recent AML decision on file. The decision was rejected as timestamps of AML decisions must be monotonically increasing. */ EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT(1827), - /** There AML decision would impose an AML check of a type that is not provided by any KYC provider known to the exchange. */ + /** The AML decision would impose an AML check of a type that is not provided by any KYC provider known to the exchange. */ EXCHANGE_AML_DECISION_UNKNOWN_CHECK(1828), /** The signature affirming the change in the AML officer status is invalid. */ @@ -593,13 +767,13 @@ enum class TalerErrorCode(val code: Int) { /** A more recent decision about the AML officer status is known to the exchange. */ EXCHANGE_MANAGEMENT_AML_OFFICERS_MORE_RECENT_PRESENT(1831), - /** The exchange already has this denomination key configured, but with different meta data. This should not be possible, contact the developers for support. */ + /** The exchange already has this denomination key configured, but with different metadata. This should not be possible; contact the developers for support. */ EXCHANGE_MANAGEMENT_CONFLICTING_DENOMINATION_META_DATA(1832), - /** The exchange already has this signing key configured, but with different meta data. This should not be possible, contact the developers for support. */ + /** The exchange already has this signing key configured, but with different metadata. This should not be possible; contact the developers for support. */ EXCHANGE_MANAGEMENT_CONFLICTING_SIGNKEY_META_DATA(1833), - /** The purse was previously created with different meta data. */ + /** The purse was previously created with different metadata. */ EXCHANGE_PURSE_CREATE_CONFLICTING_META_DATA(1850), /** The purse was previously created with a different contract. */ @@ -611,10 +785,10 @@ enum class TalerErrorCode(val code: Int) { /** The purse expiration time is in the past. */ EXCHANGE_PURSE_CREATE_EXPIRATION_BEFORE_NOW(1853), - /** The purse expiration time is \"never\". */ + /** The purse expiration time is `never`. */ EXCHANGE_PURSE_CREATE_EXPIRATION_IS_NEVER(1854), - /** The purse signature over the purse meta data is invalid. */ + /** The purse signature over the purse metadata is invalid. */ EXCHANGE_PURSE_CREATE_SIGNATURE_INVALID(1855), /** The signature over the encrypted contract is invalid. */ @@ -623,15 +797,21 @@ enum class TalerErrorCode(val code: Int) { /** The signature from the exchange over the confirmation is invalid. */ EXCHANGE_PURSE_CREATE_EXCHANGE_SIGNATURE_INVALID(1857), - /** The coin was previously deposited with different meta data. */ + /** The coin was previously deposited with different metadata. */ EXCHANGE_PURSE_DEPOSIT_CONFLICTING_META_DATA(1858), - /** The encrypted contract was previously uploaded with different meta data. */ + /** The encrypted contract was previously uploaded with different metadata. */ EXCHANGE_PURSE_ECONTRACT_CONFLICTING_META_DATA(1859), /** The deposited amount is less than the purse fee. */ EXCHANGE_CREATE_PURSE_NEGATIVE_VALUE_AFTER_FEE(1860), + /** The purse expiration time is further in the future than the exchange allows. */ + EXCHANGE_PURSE_CREATE_EXPIRATION_TOO_LATE(1862), + + /** The denomination of a coin deposited into the purse stops being legally valid before the purse expiration time. */ + EXCHANGE_PURSE_DENOMINATION_LEGAL_EXPIRES_TOO_SOON(1863), + /** The signature using the merge key is invalid. */ EXCHANGE_PURSE_MERGE_INVALID_MERGE_SIGNATURE(1876), @@ -653,7 +833,7 @@ enum class TalerErrorCode(val code: Int) { /** Conflicting data for the partner already exists with the exchange. */ EXCHANGE_MANAGEMENT_ADD_PARTNER_DATA_CONFLICT(1891), - /** The auditor signature over the denomination meta data is invalid. */ + /** The auditor signature over the denomination metadata is invalid. */ EXCHANGE_AUDITORS_AUDITOR_SIGNATURE_INVALID(1900), /** The auditor that was specified is unknown to this exchange. */ @@ -662,13 +842,16 @@ enum class TalerErrorCode(val code: Int) { /** The auditor that was specified is no longer used by this exchange. */ EXCHANGE_AUDITORS_AUDITOR_INACTIVE(1902), + /** The client submitted the wrong form for the request. This is some invalid use of the API. Please contact technical support. */ + EXCHANGE_KYC_INVALID_FORM_SUBMITTED(1917), + /** The exchange tried to run an AML program, but that program did not terminate on time. Contact the exchange operator to address the AML program bug or performance issue. If it is not a performance issue, the timeout might have to be increased (requires changes to the source code). */ EXCHANGE_KYC_GENERIC_AML_PROGRAM_TIMEOUT(1918), /** The KYC info access token is not recognized. Hence the request was denied. */ EXCHANGE_KYC_INFO_AUTHORIZATION_FAILED(1919), - /** The exchange got stuck in a long series of (likely recursive) KYC rules without user-inputs that did not result in a timely conclusion. This is a configuration failure. Please contact the administrator. */ + /** The exchange got stuck in a long series of likely recursive KYC rules without user input, preventing a timely conclusion. This is a configuration failure. The administrator should investigate. */ EXCHANGE_KYC_RECURSIVE_RULE_DETECTED(1920), /** The submitted KYC data lacks an attribute that is required by the KYC form. Please submit the complete form. */ @@ -695,7 +878,7 @@ enum class TalerErrorCode(val code: Int) { /** The backend signaled an authorization failure. */ EXCHANGE_KYC_PROOF_BACKEND_AUTHORIZATION_FAILED(1928), - /** The exchange is unaware of having made an the authorization request. */ + /** The exchange is unaware of having made the authorization request. */ EXCHANGE_KYC_PROOF_REQUEST_UNKNOWN(1929), /** The KYC authorization signature was invalid. Hence the request was denied. */ @@ -731,7 +914,7 @@ enum class TalerErrorCode(val code: Int) { /** The exchange has no account public key to check the KYC authorization signature against. Hence the request was denied. The user should do a wire transfer to the exchange with the KYC authorization key in the subject. */ EXCHANGE_KYC_CHECK_AUTHORIZATION_KEY_UNKNOWN(1940), - /** The form has been previously uploaded, and may only be filed once. The user should be redirected to their main KYC page and see if any other steps need to be taken. */ + /** The form was previously uploaded and may only be submitted once. The user should be redirected to the main KYC page to determine whether further steps are required. */ EXCHANGE_KYC_FORM_ALREADY_UPLOADED(1941), /** The internal state of the exchange specifying KYC measures is malformed. Please contact technical support. */ @@ -785,28 +968,25 @@ enum class TalerErrorCode(val code: Int) { /** TOTP key is not valid. */ EXCHANGE_TOTP_KEY_INVALID(1980), - /** An internal failure happened on the client side. Details should be in the local logs. Check if you are using the latest available version or file a report with the developers. */ - GENERIC_CLIENT_INTERNAL_ERROR(2), - - /** The HTTP method used is invalid for this endpoint. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_METHOD_INVALID(20), - /** The backend could not find the merchant instance specified in the request. */ MERCHANT_GENERIC_INSTANCE_UNKNOWN(2000), /** The start and end-times in the wire fee structure leave a hole. This is not allowed. */ MERCHANT_GENERIC_HOLE_IN_WIRE_FEE_STRUCTURE(2001), - /** The merchant was unable to obtain a valid answer to /wire from the exchange. */ - MERCHANT_GENERIC_EXCHANGE_WIRE_REQUEST_FAILED(2002), + /** The master key of the exchange does not match the one configured for this merchant. As a result, the merchant refuses to do business with this exchange. The administrator should check whether the exchange is configured correctly in the merchant backend. */ + MERCHANT_GENERIC_EXCHANGE_MASTER_KEY_MISMATCH(2002), /** The product category is not known to the backend. */ MERCHANT_GENERIC_CATEGORY_UNKNOWN(2003), + /** The unit referenced in the request is not known to the backend. */ + MERCHANT_GENERIC_UNIT_UNKNOWN(2004), + /** The proposal is not known to the backend. */ MERCHANT_GENERIC_ORDER_UNKNOWN(2005), - /** The order provided to the backend could not be completed, because a product to be completed via inventory data is not actually in our inventory. */ + /** The order provided to the backend could not be completed because a product specified through inventory data is not in the inventory. */ MERCHANT_GENERIC_PRODUCT_UNKNOWN(2006), /** The reward ID is unknown. This could happen if the reward has expired. */ @@ -827,7 +1007,7 @@ enum class TalerErrorCode(val code: Int) { /** The merchant failed to talk to the exchange. */ MERCHANT_GENERIC_EXCHANGE_CONNECT_FAILURE(2012), - /** The exchange returned a maformed response. */ + /** The exchange returned a malformed response. */ MERCHANT_GENERIC_EXCHANGE_REPLY_MALFORMED(2013), /** The exchange returned an unexpected response status. */ @@ -842,16 +1022,16 @@ enum class TalerErrorCode(val code: Int) { /** The backend could not find the inbound wire transfer specified in the request. */ MERCHANT_GENERIC_TRANSFER_UNKNOWN(2017), - /** The backend could not find the template(id) because it is not exist. */ + /** The backend could not find the template with the specified ID because it does not exist. */ MERCHANT_GENERIC_TEMPLATE_UNKNOWN(2018), - /** The backend could not find the webhook(id) because it is not exist. */ + /** The backend could not find the webhook with the specified ID because it does not exist. */ MERCHANT_GENERIC_WEBHOOK_UNKNOWN(2019), - /** The backend could not find the webhook(serial) because it is not exist. */ + /** The backend could not find the webhook with the specified serial because it does not exist. */ MERCHANT_GENERIC_PENDING_WEBHOOK_UNKNOWN(2020), - /** The backend could not find the OTP device(id) because it is not exist. */ + /** The backend could not find the OTP device with the specified ID because it does not exist. */ MERCHANT_GENERIC_OTP_DEVICE_UNKNOWN(2021), /** The account is not known to the backend. */ @@ -875,8 +1055,53 @@ enum class TalerErrorCode(val code: Int) { /** The merchant backend is not configured to support the DONAU protocol. */ MERCHANT_GENERIC_DONAU_NOT_CONFIGURED(2028), - /** There is no endpoint defined for the URL provided by the client. Check if you used the correct URL and/or file a report with the developers of the client software. */ - GENERIC_ENDPOINT_UNKNOWN(21), + /** The public signing key given in the exchange response is not in the current keys response. It is possible that the operation will succeed later after the merchant has downloaded an updated keys response. */ + MERCHANT_EXCHANGE_SIGN_PUB_UNKNOWN(2029), + + /** The merchant backend does not support the requested feature. */ + MERCHANT_GENERIC_FEATURE_NOT_AVAILABLE(2030), + + /** This operation requires multi-factor authorization, but the instance does not have enough configured factors that can be validated. The system administrator must perform this operation. */ + MERCHANT_GENERIC_MFA_MISSING(2031), + + /** A donation authority (Donau) provided an invalid response. This should be analyzed by the administrator. Trying again later may help. */ + MERCHANT_GENERIC_DONAU_INVALID_RESPONSE(2032), + + /** The unit referenced in the request is built-in and cannot be modified or deleted. */ + MERCHANT_GENERIC_UNIT_BUILTIN(2033), + + /** The report ID provided to the backend is not known to the backend. */ + MERCHANT_GENERIC_REPORT_UNKNOWN(2034), + + /** The report ID provided to the backend is not known to the backend. */ + MERCHANT_GENERIC_REPORT_GENERATOR_UNCONFIGURED(2035), + + /** The product group ID provided to the backend is not known to the backend. */ + MERCHANT_GENERIC_PRODUCT_GROUP_UNKNOWN(2036), + + /** The money pod ID provided to the backend is not known to the backend. */ + MERCHANT_GENERIC_MONEY_POT_UNKNOWN(2037), + + /** The session ID provided to the backend is not known to the backend. */ + MERCHANT_GENERIC_SESSION_UNKNOWN(2038), + + /** The merchant does not have a charity associated with the selected Donau. As a result, it cannot generate the requested donation receipt. This could happen if the charity was removed from the backend between order creation and payment. */ + MERCHANT_GENERIC_DONAU_CHARITY_UNKNOWN(2039), + + /** The merchant does not expect a transfer with the given ID and therefore cannot return any details about it. */ + MERCHANT_GENERIC_EXPECTED_TRANSFER_UNKNOWN(2040), + + /** The Donau is not known to the backend. */ + MERCHANT_GENERIC_DONAU_UNKNOWN(2041), + + /** The access token is not known to the backend. */ + MERCHANT_GENERIC_ACCESS_TOKEN_UNKNOWN(2042), + + /** The fountain is not known to the backend. */ + MERCHANT_GENERIC_FOUNTAIN_UNKNOWN(2043), + + /** One of the binaries needed to generate the PDF is not installed. If this feature is required, the system administrator should make sure Typst and pdftk are both installed. */ + MERCHANT_GENERIC_NO_TYPST_OR_PDFTK(2048), /** The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response. */ MERCHANT_GET_ORDERS_EXCHANGE_TRACKING_FAILURE(2100), @@ -893,9 +1118,39 @@ enum class TalerErrorCode(val code: Int) { /** The contract terms hash used to authenticate the client is invalid for this order. */ MERCHANT_GET_ORDERS_ID_INVALID_CONTRACT_HASH(2106), - /** The contract terms version is not invalid. */ + /** The contract terms version is not understood by the merchant backend. Most likely the merchant backend was downgraded to a version incompatible with the content of the database. */ MERCHANT_GET_ORDERS_ID_INVALID_CONTRACT_VERSION(2107), + /** The provided TAN code is invalid for this challenge. */ + MERCHANT_TAN_CHALLENGE_FAILED(2125), + + /** The backend is not aware of the specified MFA challenge. */ + MERCHANT_TAN_CHALLENGE_UNKNOWN(2126), + + /** There have been too many attempts to solve the challenge. A new TAN must be requested. */ + MERCHANT_TAN_TOO_MANY_ATTEMPTS(2127), + + /** The backend failed to launch a helper process required for the multi-factor authentication step. The backend operator should check the logs and fix the Taler merchant backend configuration. */ + MERCHANT_TAN_MFA_HELPER_EXEC_FAILED(2128), + + /** The challenge was already solved. Therefore, the service refuses to send it again. */ + MERCHANT_TAN_CHALLENGE_SOLVED(2129), + + /** It is too early to request another transmission of the challenge. The client should wait and see if they received the previous challenge. */ + MERCHANT_TAN_TOO_EARLY(2130), + + /** There have been too many attempts to solve MFA. The client may attempt again in the future. */ + MERCHANT_MFA_FORBIDDEN(2131), + + /** The transmission helper rejected the address configured for this multi-factor authentication step: it is malformed, of the wrong length, not a mobile subscription, unallocated, or blocked. The address should be corrected. */ + MERCHANT_TAN_ADDRESS_UNUSABLE(2132), + + /** The address is valid but the recipient could not be reached: the handset is switched off or out of coverage, or the message expired before delivery. Retrying later may succeed. */ + MERCHANT_TAN_ADDRESS_UNREACHABLE(2133), + + /** The transmission helper is misconfigured: a required credential is absent, the configured credentials were refused by the provider, or the provider account has insufficient balance. The backend operator should check the logs and fix the Taler merchant backend configuration. */ + MERCHANT_TAN_HELPER_MISCONFIGURED(2134), + /** The exchange responded saying that funds were insufficient (for example, due to double-spending). */ MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_FUNDS(2150), @@ -914,13 +1169,13 @@ enum class TalerErrorCode(val code: Int) { /** After considering deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. The client should revisit the logic used to calculate fees it must cover. */ MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_DUE_TO_FEES(2155), - /** Even if we do not consider deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. */ + /** Even without considering deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract. */ MERCHANT_POST_ORDERS_ID_PAY_PAYMENT_INSUFFICIENT(2156), /** The signature over the contract of one of the coins was invalid. */ MERCHANT_POST_ORDERS_ID_PAY_COIN_SIGNATURE_INVALID(2157), - /** When we tried to find information about the exchange to issue the deposit, we failed. This usually only happens if the merchant backend is somehow unable to get its own HTTP client logic to work. */ + /** The merchant backend failed to find information about the exchange to issue the deposit. This usually happens when the merchant backend's HTTP client logic is not working. */ MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_LOOKUP_FAILED(2158), /** The refund deadline in the contract is after the transfer deadline. */ @@ -932,7 +1187,7 @@ enum class TalerErrorCode(val code: Int) { /** The payment is too late, the offer has expired. */ MERCHANT_POST_ORDERS_ID_PAY_OFFER_EXPIRED(2161), - /** The \"merchant\" field is missing in the proposal data. This is an internal error as the proposal is from the merchant's own database at this point. */ + /** The `merchant` field is missing from the proposal data. This is an internal error because the proposal comes from the merchant's own database at this point. */ MERCHANT_POST_ORDERS_ID_PAY_MERCHANT_FIELD_MISSING(2162), /** Failed to locate merchant's account information matching the wire hash given in the proposal. */ @@ -944,14 +1199,14 @@ enum class TalerErrorCode(val code: Int) { /** The exchange of the deposited coin charges a wire fee that could not be added to the total (total amount too high). */ MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_WIRE_FEE_ADDITION_FAILED(2166), - /** The contract was not fully paid because of refunds. Note that clients MAY treat this as paid if, for example, contracts must be executed despite of refunds. */ + /** The contract was not fully paid because of refunds. Clients may treat it as paid if, for example, the contract must be executed despite refunds. */ MERCHANT_POST_ORDERS_ID_PAY_REFUNDED(2167), - /** According to our database, we have refunded more than we were paid (which should not be possible). */ + /** The database indicates that more was refunded than was paid, which should not be possible. */ MERCHANT_POST_ORDERS_ID_PAY_REFUNDS_EXCEED_PAYMENTS(2168), - /** Legacy stuff. Remove me with protocol v1. */ - DEAD_QQQ_PAY_MERCHANT_POST_ORDERS_ID_ABORT_REFUND_REFUSED_PAYMENT_COMPLETE(2169), + /** The refund request is too late because it is past the wire transfer deadline of the order. The merchant must find a different way to pay back the money to the customer. */ + MERCHANT_PRIVATE_POST_REFUND_AFTER_WIRE_DEADLINE(2169), /** The payment failed at the exchange. */ MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_FAILED(2170), @@ -962,7 +1217,7 @@ enum class TalerErrorCode(val code: Int) { /** The payment required a minimum age but one of the coins provided an age_commitment that contained a wrong number of public keys compared to the number of age groups defined in the denomination of the coin. */ MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_SIZE_MISMATCH(2172), - /** The payment required a minimum age but one of the coins provided a minimum_age_sig that couldn't be verified with the given age_commitment for that particular minimum age. */ + /** The payment required a minimum age, but one of the coins provided a `minimum_age_sig` that could not be verified with the given `age_commitment` for that minimum age. */ MERCHANT_POST_ORDERS_ID_PAY_AGE_VERIFICATION_FAILED(2173), /** The payment required no minimum age but one of the coins (of a denomination with support for age restriction) did not provide the required h_age_commitment. */ @@ -995,11 +1250,29 @@ enum class TalerErrorCode(val code: Int) { /** Invalid token because it was already used, is expired or not yet valid. */ MERCHANT_POST_ORDERS_ID_PAY_TOKEN_INVALID(2183), - /** The payment violates a transaction limit configured at the given exchange. The wallet has a bug in that it failed to check exchange limits during coin selection. Please report the bug to your wallet developer. */ + /** The payment violates a transaction limit configured at the given exchange. The wallet failed to check exchange limits during coin selection. The wallet developer should investigate. */ MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_TRANSACTION_LIMIT_VIOLATION(2184), - /** The JSON in the client's request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_JSON_INVALID(22), + /** The donation amount provided in the BKPS does not match the amount of the order choice. */ + MERCHANT_POST_ORDERS_ID_PAY_DONATION_AMOUNT_MISMATCH(2185), + + /** Some of the exchanges involved refused the request for reasons related to legitimization. The wallet should try with coins of different exchanges. The merchant should check if they have some legitimization process pending at the exchange. */ + MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_LEGALLY_REFUSED(2186), + + /** The order was already paid, but the request specified a different choice. The client should use the choice with which the order was actually paid. */ + MERCHANT_POST_ORDERS_ID_PAY_CHOICE_INDEX_MISMATCH(2187), + + /** The payment succeeded, but the donation authority (Donau) could not issue the donation receipts at this time. The response contains the payment confirmation. The wallet should replay the payment request later to obtain the receipts. */ + MERCHANT_POST_ORDERS_ID_PAY_DONAU_RECEIPTS_DELAYED(2188), + + /** The payment succeeded, but the donation authority (Donau) refused to issue the donation receipts. The response contains the payment confirmation. Replaying the payment request will not produce the receipts. */ + MERCHANT_POST_ORDERS_ID_PAY_DONAU_RECEIPTS_REFUSED(2189), + + /** The order was already paid and has since been refunded, possibly only in part. The payment request can no longer be replayed. The wallet should query the refunds instead. */ + MERCHANT_POST_ORDERS_ID_PAY_REPLAY_AFTER_REFUND(2190), + + /** The donation year in the request is not the current year. Nothing was paid. The wallet should create the donation receipt requests for the current year and try again. */ + MERCHANT_POST_ORDERS_ID_PAY_DONATION_YEAR_INVALID(2191), /** The contract hash does not match the given order ID. */ MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH(2200), @@ -1031,10 +1304,10 @@ enum class TalerErrorCode(val code: Int) { /** The array of coins cannot be empty. */ MERCHANT_POST_ORDERS_ID_ABORT_COINS_ARRAY_EMPTY(2256), - /** We are waiting for the exchange to provide us with key material before checking the wire transfer. */ + /** The merchant is waiting for the exchange to provide key material before checking the wire transfer. */ MERCHANT_EXCHANGE_TRANSFERS_AWAITING_KEYS(2258), - /** We are waiting for the exchange to provide us with the list of aggregated transactions. */ + /** The merchant is waiting for the exchange to provide the list of aggregated transactions. */ MERCHANT_EXCHANGE_TRANSFERS_AWAITING_LIST(2259), /** The endpoint indicated in the wire transfer does not belong to a GNU Taler exchange. */ @@ -1046,30 +1319,36 @@ enum class TalerErrorCode(val code: Int) { /** The interaction with the exchange is delayed due to rate limiting. */ MERCHANT_EXCHANGE_TRANSFERS_RATE_LIMITED(2262), - /** We experienced a transient failure in our interaction with the exchange. */ + /** The merchant experienced a transient failure while interacting with the exchange. */ MERCHANT_EXCHANGE_TRANSFERS_TRANSIENT_FAILURE(2263), /** The response from the exchange was unacceptable and should be reviewed with an auditor. */ MERCHANT_EXCHANGE_TRANSFERS_HARD_FAILURE(2264), - /** Some of the HTTP headers provided by the client were malformed and caused the server to not be able to handle the request. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_HTTP_HEADERS_MALFORMED(23), + /** The merchant backend failed to reach the banking gateway to shorten the wire transfer subject. This probably means that the banking gateway of the exchange is currently down. Contact the exchange operator or simply retry again later. */ + MERCHANT_POST_ACCOUNTS_KYCAUTH_BANK_GATEWAY_UNREACHABLE(2275), + + /** The merchant backend failed to reach the banking gateway to shorten the wire transfer subject. This probably means that the banking gateway of the exchange is currently down. Contact the exchange operator or simply retry again later. */ + MERCHANT_POST_ACCOUNTS_EXCHANGE_TOO_OLD(2276), + + /** The merchant backend failed to reach the specified exchange. This probably means that the exchange is currently down. Contact the exchange operator or simply retry again later. */ + MERCHANT_POST_ACCOUNTS_KYCAUTH_EXCHANGE_UNREACHABLE(2277), - /** We could not claim the order because the backend is unaware of it. */ + /** The order could not be claimed because the backend is unaware of it. */ MERCHANT_POST_ORDERS_ID_CLAIM_NOT_FOUND(2300), - /** We could not claim the order because someone else claimed it first. */ + /** The order could not be claimed because another client claimed it first. */ MERCHANT_POST_ORDERS_ID_CLAIM_ALREADY_CLAIMED(2301), - /** The client-side experienced an internal failure. */ + /** The client experienced an internal failure. */ MERCHANT_POST_ORDERS_ID_CLAIM_CLIENT_INTERNAL_FAILURE(2302), + /** The unclaim signature of the wallet is not valid for the given contract hash. */ + MERCHANT_POST_ORDERS_UNCLAIM_SIGNATURE_INVALID(2303), + /** The backend failed to sign the refund request. */ MERCHANT_POST_ORDERS_ID_REFUND_SIGNATURE_FAILED(2350), - /** The payto:// URI provided by the client is malformed. Check that you are using the correct syntax as of RFC 8905 and/or that you entered the bank account number correctly. */ - GENERIC_PAYTO_URI_MALFORMED(24), - /** The client failed to unblind the signature returned by the merchant. */ MERCHANT_REWARD_PICKUP_UNBLIND_FAILURE(2400), @@ -1088,9 +1367,6 @@ enum class TalerErrorCode(val code: Int) { /** The merchant did not find the specified denomination key in the exchange's key set. */ MERCHANT_REWARD_PICKUP_DENOMINATION_UNKNOWN(2407), - /** A required parameter in the request was missing. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_PARAMETER_MISSING(25), - /** The merchant instance has no active bank accounts configured. However, at least one bank account must be available to create new orders. */ MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE(2500), @@ -1109,7 +1385,7 @@ enum class TalerErrorCode(val code: Int) { /** The order creation request is invalid because the delivery date given is in the past. */ MERCHANT_PRIVATE_POST_ORDERS_DELIVERY_DATE_IN_PAST(2505), - /** The order creation request is invalid because a wire deadline of \"never\" is not allowed. */ + /** The order creation request is invalid because a wire deadline of `never` is not allowed. */ MERCHANT_PRIVATE_POST_ORDERS_WIRE_DEADLINE_IS_NEVER(2506), /** The order creation request is invalid because the given payment deadline is in the past. */ @@ -1118,7 +1394,7 @@ enum class TalerErrorCode(val code: Int) { /** The order creation request is invalid because the given refund deadline is in the past. */ MERCHANT_PRIVATE_POST_ORDERS_REFUND_DEADLINE_IN_PAST(2508), - /** The backend does not trust any exchange that would allow funds to be wired to any bank account of this instance using the wire method specified with the order. (Note that right now, we do not support the use of exchange bank accounts with mandatory currency conversion.) One likely cause for this is that the taler-merchant-exchangekeyupdate process is not running. */ + /** The backend does not trust any exchange that would allow funds to be wired to a bank account of this instance using the wire method specified with the order. Exchange bank accounts with mandatory currency conversion are not currently supported. A likely cause is that the `taler-merchant-exchangekeyupdate` process is not running. */ MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGES_FOR_WIRE_METHOD(2509), /** One of the paths to forget is malformed. */ @@ -1127,22 +1403,25 @@ enum class TalerErrorCode(val code: Int) { /** One of the paths to forget was not marked as forgettable. */ MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_NOT_FORGETTABLE(2511), - /** The refund amount would violate a refund transaction limit configured at the given exchange. Please find another way to refund the customer, and inquire with your legislator why they make strange banking regulations. */ + /** The refund amount would violate a refund transaction limit configured at the given exchange. The merchant should use another way to refund the customer and consult the exchange operator about the applicable regulations. */ MERCHANT_POST_ORDERS_ID_REFUND_EXCHANGE_TRANSACTION_LIMIT_VIOLATION(2512), - /** The total order amount exceeds hard legal transaction limits from the available exchanges, thus a customer could never legally make this payment. You may try to increase your limits by passing legitimization checks with exchange operators. You could also inquire with your legislator why the limits are prohibitively low for your business. */ + /** The total order amount exceeds the legal transaction limits of the available exchanges, so a customer could not legally make this payment. The merchant may increase its limits by completing legitimization checks with exchange operators. */ MERCHANT_PRIVATE_POST_ORDERS_AMOUNT_EXCEEDS_LEGAL_LIMITS(2513), - /** A currency specified to be paid in the contract is not supported by any exchange that this instance can currently use. Possible solutions include (1) specifying a different currency, (2) adding additional suitable exchange operators to the merchant backend configuration, or (3) satisfying compliance rules of an configured exchange to begin using the service of that provider. */ + /** A currency specified to be paid in the contract is not supported by any exchange that this instance can currently use. Possible solutions include (1) specifying a different currency, (2) adding suitable exchange operators to the merchant backend configuration, or (3) satisfying the compliance rules of a configured exchange to begin using that provider's service. */ MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGE_FOR_CURRENCY(2514), - /** The order provided to the backend could not be deleted, our offer is still valid and awaiting payment. Deletion may work later after the offer has expired if it remains unpaid. */ + /** The order provided to the backend could not be deleted because the offer is still valid and awaiting payment. Deletion may work after the offer expires if it remains unpaid. */ MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT(2520), /** The order provided to the backend could not be deleted as the order was already paid. */ MERCHANT_PRIVATE_DELETE_ORDERS_ALREADY_PAID(2521), - /** 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 client requested a report granularity that is not available at the backend. Possible solutions include extending the backend code and/or the database statistic triggers to support the desired data granularity. Alternatively, the client could request a different granularity. */ + MERCHANT_PRIVATE_GET_STATISTICS_REPORT_GRANULARITY_UNAVAILABLE(2525), + + /** 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. */ MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_INCONSISTENT_AMOUNT(2530), /** Only paid orders can be refunded, and the frontend specified an unpaid order to issue a refund for. */ @@ -1157,10 +1436,25 @@ enum class TalerErrorCode(val code: Int) { /** A token family referenced in this order is either expired or not valid yet. */ MERCHANT_PRIVATE_POST_ORDERS_TOKEN_FAMILY_NOT_VALID(2534), + /** 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. */ + 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. */ + 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. */ + 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. */ + 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. */ + MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_EXTERNAL_ALREADY_EXISTS(2539), + /** The exchange says it does not know this transfer. */ MERCHANT_PRIVATE_POST_TRANSFERS_EXCHANGE_UNKNOWN(2550), - /** We internally failed to execute the /track/transfer request. */ + /** The backend failed to execute the `/track/transfer` request internally. */ MERCHANT_PRIVATE_POST_TRANSFERS_REQUEST_ERROR(2551), /** The amount transferred differs between what was submitted and what the exchange claimed. */ @@ -1172,20 +1466,26 @@ enum class TalerErrorCode(val code: Int) { /** The exchange charged a different wire fee than what it originally advertised, and it is higher. */ MERCHANT_PRIVATE_POST_TRANSFERS_BAD_WIRE_FEE(2554), - /** We did not find the account that the transfer was made to. */ + /** The backend did not find the account to which the transfer was made. */ MERCHANT_PRIVATE_POST_TRANSFERS_ACCOUNT_NOT_FOUND(2555), - /** The backend could not delete the transfer as the echange already replied to our inquiry about it and we have integrated the result. */ + /** The backend could not delete the transfer because the exchange already responded to the inquiry and the result was integrated. */ MERCHANT_PRIVATE_DELETE_TRANSFERS_ALREADY_CONFIRMED(2556), - /** The backend was previously informed about a wire transfer with the same ID but a different amount. Multiple wire transfers with the same ID are not allowed. If the new amount is correct, the old transfer should first be deleted. */ + /** The backend could not persist the wire transfer due to the state of the backend. This usually means that a wire transfer with the same wire transfer subject but a different amount was previously submitted to the backend. */ MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_SUBMISSION(2557), + /** The target bank account given by the exchange is not (or no longer) known at the merchant instance. */ + MERCHANT_EXCHANGE_TRANSFERS_TARGET_ACCOUNT_UNKNOWN(2558), + /** The amount transferred differs between what was submitted and what the exchange claimed. */ MERCHANT_EXCHANGE_TRANSFERS_CONFLICTING_TRANSFERS(2563), - /** A parameter in the request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_PARAMETER_MALFORMED(26), + /** The report ID provided to the backend is not known to the backend. */ + MERCHANT_REPORT_GENERATOR_FAILED(2570), + + /** Failed to fetch the data for the report from the backend. */ + MERCHANT_REPORT_FETCH_FAILED(2571), /** The merchant backend cannot create an instance under the given identifier as one already exists. Use PATCH to modify the existing entry. */ MERCHANT_PRIVATE_POST_INSTANCES_ALREADY_EXISTS(2600), @@ -1199,6 +1499,9 @@ enum class TalerErrorCode(val code: Int) { /** The merchant backend cannot create an instance under the given identifier, the previous one was deleted but must be purged first. */ MERCHANT_PRIVATE_POST_INSTANCES_PURGE_REQUIRED(2603), + /** The merchant backend cannot update an instance's authentication settings because the required current password was missing or did not match. */ + MERCHANT_PRIVATE_POST_INSTANCE_AUTH_BAD_OLD_PASSWORD(2604), + /** The merchant backend cannot update an instance under the given identifier, the previous one was deleted but must be purged first. */ MERCHANT_PRIVATE_PATCH_INSTANCES_PURGE_REQUIRED(2625), @@ -1208,6 +1511,9 @@ enum class TalerErrorCode(val code: Int) { /** The bank account specified in the request already exists at the merchant. */ MERCHANT_PRIVATE_ACCOUNT_EXISTS(2627), + /** The bank account specified is not acceptable for this exchange. The exchange either does not support the wire method or does not support another property of the account. Check the exchange account constraints and specify a different bank account if necessary. */ + MERCHANT_PRIVATE_ACCOUNT_NOT_ELIGIBLE_FOR_EXCHANGE(2628), + /** The product ID exists. */ MERCHANT_PRIVATE_POST_PRODUCTS_CONFLICT_PRODUCT_EXISTS(2650), @@ -1229,11 +1535,17 @@ enum class TalerErrorCode(val code: Int) { /** The lock request is for more products than we have left (unlocked) in stock. */ MERCHANT_PRIVATE_POST_PRODUCTS_LOCK_INSUFFICIENT_STOCKS(2670), - /** The deletion request is for a product that is locked. */ + /** The deletion request is for a locked product. The product cannot be deleted until the existing offer expires. */ MERCHANT_PRIVATE_DELETE_PRODUCTS_CONFLICTING_LOCK(2680), - /** The reserve public key was malformed. */ - GENERIC_RESERVE_PUB_MALFORMED(27), + /** The proposed name for the product group is already in use. The client should select a different name. */ + MERCHANT_PRIVATE_PRODUCT_GROUP_CONFLICTING_NAME(2690), + + /** The proposed name for the money pot is already in use. The client should select a different name. */ + MERCHANT_PRIVATE_MONEY_POT_CONFLICTING_NAME(2691), + + /** The total amount in the money pot is different from the amount required by the request. The client should fetch the current pot total and retry with the latest amount to succeed. */ + MERCHANT_PRIVATE_MONEY_POT_CONFLICTING_TOTAL(2692), /** The requested wire method is not supported by the exchange. */ MERCHANT_PRIVATE_POST_RESERVES_UNSUPPORTED_WIRE_METHOD(2700), @@ -1256,9 +1568,6 @@ enum class TalerErrorCode(val code: Int) { /** The backend failed to find a reserve needed to authorize the reward. */ MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_NOT_FOUND(2753), - /** The body in the request could not be decompressed by the server. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_COMPRESSION_INVALID(28), - /** The merchant backend encountered a failure in computing the deposit total. */ MERCHANT_PRIVATE_GET_ORDERS_ID_AMOUNT_ARITHMETIC_FAILURE(2800), @@ -1268,6 +1577,9 @@ enum class TalerErrorCode(val code: Int) { /** The OTP device ID already exists. */ MERCHANT_PRIVATE_POST_OTP_DEVICES_CONFLICT_OTP_DEVICE_EXISTS(2851), + /** The OTP device algorithm cannot be changed, or the device was concurrently replaced or changed during the update. */ + MERCHANT_PRIVATE_PATCH_OTP_DEVICES_CONFLICT(2852), + /** Amount given in the using template and in the template contract. There is a conflict. */ MERCHANT_POST_USING_TEMPLATES_AMOUNT_CONFLICT_TEMPLATES_CONTRACT_AMOUNT(2860), @@ -1280,8 +1592,14 @@ enum class TalerErrorCode(val code: Int) { /** Subject not given in the using template and in the template contract. There is a conflict. */ MERCHANT_POST_USING_TEMPLATES_NO_SUMMARY(2863), - /** A segment in the path of the URL provided by the client is malformed. Check that you are using the correct encoding for the URL. */ - GENERIC_PATH_SEGMENT_MALFORMED(29), + /** The selected template has a different type from the one specified in the client request. This may happen if the template was updated since the client last fetched it. The client should refetch the current template and send a request with the correct type. */ + MERCHANT_POST_USING_TEMPLATES_WRONG_TYPE(2864), + + /** The selected template does not allow one of the specified products to be included in the order. This may happen if the template was updated since the client last fetched it. The client should refetch the current template and send a request with the correct type. */ + MERCHANT_POST_USING_TEMPLATES_WRONG_PRODUCT(2865), + + /** The selected combination of products does not allow the backend to compute a price for the order in any of the supported currencies. This may happen if the template was updated since the last time the client fetched it or if the wallet assembled an unsupported combination of products. The site administrator might want to specify additional prices for products, while the client should re-fetch the current template and send a request with a combination of products for which prices exist in the same currency. */ + MERCHANT_POST_USING_TEMPLATES_NO_CURRENCY(2866), /** The webhook ID elready exists. */ MERCHANT_PRIVATE_POST_WEBHOOKS_CONFLICT_WEBHOOK_EXISTS(2900), @@ -1289,11 +1607,14 @@ enum class TalerErrorCode(val code: Int) { /** The webhook serial elready exists. */ MERCHANT_PRIVATE_POST_PENDING_WEBHOOKS_CONFLICT_PENDING_WEBHOOK_EXISTS(2910), - /** The client does not support the protocol version advertised by the server. */ - GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION(3), + /** A withdrawal entry refers to a token family without a matching grant in the fountain. */ + MERCHANT_POST_FOUNTAIN_WITHDRAW_GRANT_UNKNOWN(2950), - /** The currency involved in the operation is not acceptable for this server. Check your configuration and make sure the currency specified for a given service provider is one of the currencies supported by that provider. */ - GENERIC_CURRENCY_MISMATCH(30), + /** The desired token validity time selects an issue key slot outside of the grant's key window. */ + MERCHANT_POST_FOUNTAIN_WITHDRAW_SLOT_OUTSIDE_WINDOW(2951), + + /** The grant's per-period withdrawal limit is exhausted for the requested issue key slot. */ + MERCHANT_POST_FOUNTAIN_WITHDRAW_LIMIT_EXCEEDED(2952), /** The auditor refused the connection due to a lack of authorization. */ AUDITOR_GENERIC_UNAUTHORIZED(3001), @@ -1301,9 +1622,6 @@ enum class TalerErrorCode(val code: Int) { /** This method is not allowed here. */ AUDITOR_GENERIC_METHOD_NOT_ALLOWED(3002), - /** The URI is longer than the longest URI the HTTP server is willing to parse. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit. */ - GENERIC_URI_TOO_LONG(31), - /** The signature from the exchange on the deposit confirmation is invalid. */ AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID(3100), @@ -1316,30 +1634,6 @@ enum class TalerErrorCode(val code: Int) { /** The URI is missing a path component. */ AUDITOR_URI_MISSING_PATH_COMPONENT(3103), - /** The body is too large to be permissible for the endpoint. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit. */ - GENERIC_UPLOAD_EXCEEDS_LIMIT(32), - - /** The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner. */ - GENERIC_UNAUTHORIZED(40), - - /** The service refused the request as the given authorization token is unknown. You should request a valid access token from the account owner. */ - GENERIC_TOKEN_UNKNOWN(41), - - /** The service refused the request as the given authorization token expired. You should request a fresh authorization token from the account owner. */ - GENERIC_TOKEN_EXPIRED(42), - - /** The service refused the request as the given authorization token is invalid or malformed. You should check that you have the right credentials. */ - GENERIC_TOKEN_MALFORMED(43), - - /** The service refused the request due to lack of proper rights on the resource. You may need different credentials to be allowed to perform this operation. */ - GENERIC_FORBIDDEN(44), - - /** The service failed initialize its connection to the database. The system administrator should check that the service has permissions to access the database and that the database is running. */ - GENERIC_DB_SETUP_FAILED(50), - - /** The service encountered an error event to just start the database transaction. The system administrator should check that the database is running. */ - GENERIC_DB_START_FAILED(51), - /** Wire transfer attempted with credit and debit party being the same bank account. */ BANK_SAME_ACCOUNT(5101), @@ -1445,7 +1739,7 @@ enum class TalerErrorCode(val code: Int) { /** A non-admin user has tried to change their debt limit. */ BANK_NON_ADMIN_PATCH_DEBT_LIMIT(5136), - /** A non-admin user has tried to change their password whihout providing the current one. */ + /** A non-admin user tried to change their password without providing the current password. */ BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD(5137), /** Provided old password does not match current password. */ @@ -1460,7 +1754,7 @@ enum class TalerErrorCode(val code: Int) { /** A non-admin user has tried to change their contact info. */ BANK_NON_ADMIN_PATCH_CONTACT(5141), - /** The client tried to create a transaction that credit the admin account. */ + /** The client tried to create a transaction that credits the administrator's account. */ BANK_ADMIN_CREDITOR(5142), /** The referenced challenge was not found. */ @@ -1475,7 +1769,7 @@ enum class TalerErrorCode(val code: Int) { /** A non-admin user has tried to set their minimum cashout amount. */ BANK_NON_ADMIN_SET_MIN_CASHOUT(5146), - /** Amount of currency conversion it less than the minimum allowed. */ + /** The amount of the currency conversion is less than the minimum allowed. */ BANK_CONVERSION_AMOUNT_TO_SMALL(5147), /** Specified amount will not work for this withdrawal. */ @@ -1490,37 +1784,43 @@ enum class TalerErrorCode(val code: Int) { /** Provided password is too long. */ BANK_PASSWORD_TOO_LONG(5151), - /** Bank account is locked and cannot authenticate using his password. */ + /** The bank account is locked, and the user cannot authenticate with their password. */ BANK_ACCOUNT_LOCKED(5152), - /** The client attempted to update a transaction' details that was already aborted. */ + /** The client attempted to update the details of a transaction that was already aborted. */ BANK_UPDATE_ABORT_CONFLICT(5153), /** The wtid for a request to transfer funds has already been used, but with a different request unpaid. */ BANK_TRANSFER_WTID_REUSED(5154), - /** The service failed to store information in its database. The system administrator should check that the database is running and review the service logs. */ - GENERIC_DB_STORE_FAILED(52), + /** A non-admin user tried to set their conversion rate class. */ + BANK_NON_ADMIN_SET_CONVERSION_RATE_CLASS(5155), - /** The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs. */ - GENERIC_DB_FETCH_FAILED(53), + /** The referenced conversion rate class was not found. */ + BANK_CONVERSION_RATE_CLASS_UNKNOWN(5156), - /** The service encountered an unrecoverable error trying to commit a transaction to the database. The system administrator should check that the database is running and review the service logs. */ - GENERIC_DB_COMMIT_FAILED(54), + /** The client tried to use an already taken name. */ + BANK_NAME_REUSE(5157), - /** The service encountered an error event to commit the database transaction, even after repeatedly retrying it there was always a conflicting transaction. This indicates a repeated serialization error; it should only happen if some client maliciously tries to create conflicting concurrent transactions. It could also be a sign of a missing index. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_DB_SOFT_FAILURE(55), + /** This subject format is not supported. */ + BANK_UNSUPPORTED_SUBJECT_FORMAT(5158), - /** The service's database is inconsistent and violates service-internal invariants. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_DB_INVARIANT_FAILURE(56), + /** The derived subject is already used. */ + BANK_DERIVATION_REUSE(5159), - /** The HTTP server experienced an internal invariant failure (bug). Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_INTERNAL_INVARIANT_FAILURE(60), + /** The provided signature is invalid. */ + BANK_BAD_SIGNATURE(5160), - /** The service could not compute a cryptographic hash over some JSON value. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_FAILED_COMPUTE_JSON_HASH(61), + /** The provided timestamp is too old. */ + BANK_OLD_TIMESTAMP(5161), + + /** The `authorization_pub` for a request to transfer funds has already been used for another non-recurring transfer. */ + BANK_TRANSFER_MAPPING_REUSED(5162), + + /** The authorization_pub for a request to transfer funds is not currently registered. */ + BANK_TRANSFER_MAPPING_UNKNOWN(5163), - /** The sync service failed find the account in its database. */ + /** The sync service failed to find the account in its database. */ SYNC_ACCOUNT_UNKNOWN(6100), /** The SHA-512 hash provided in the If-None-Match header is malformed. */ @@ -1550,10 +1850,10 @@ enum class TalerErrorCode(val code: Int) { /** HTTP server experienced a timeout while awaiting promised payment. */ SYNC_PAYMENT_GENERIC_TIMEOUT(6109), - /** Sync could not setup the payment request with its own backend. */ + /** The sync service could not set up the payment request with its own backend. */ SYNC_PAYMENT_CREATE_BACKEND_ERROR(6110), - /** The sync service failed find the backup to be updated in its database. */ + /** The sync service failed to find the backup to be updated in its database. */ SYNC_PREVIOUS_BACKUP_UNKNOWN(6111), /** The \"Content-length\" field for the upload is missing. */ @@ -1565,11 +1865,11 @@ enum class TalerErrorCode(val code: Int) { /** Sync experienced a timeout communicating with its payment backend. */ SYNC_GENERIC_BACKEND_TIMEOUT(6114), - /** The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers. */ - GENERIC_FAILED_COMPUTE_AMOUNT(62), + /** The provided new content is based on an outdated backup: the previous write was overwritten in the meantime. */ + SYNC_CONFLICTING_WRITE(6115), - /** The HTTP server had insufficient memory to parse the request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ - GENERIC_PARSER_OUT_OF_MEMORY(70), + /** The backup does not form a consistent linked list (e.g. the previous block does not match the given hash). */ + SYNC_INCONSISTENT_BACKUP(6116), /** The wallet does not implement a version of the exchange protocol that is compatible with the protocol version of the exchange. */ WALLET_EXCHANGE_PROTOCOL_VERSION_INCOMPATIBLE(7000), @@ -1577,7 +1877,7 @@ enum class TalerErrorCode(val code: Int) { /** The wallet encountered an unexpected exception. This is likely a bug in the wallet implementation. */ WALLET_UNEXPECTED_EXCEPTION(7001), - /** The wallet received a response from a server, but the response can't be parsed. */ + /** The wallet received a response from a server, but the response cannot be parsed. */ WALLET_RECEIVED_MALFORMED_RESPONSE(7002), /** The wallet tried to make a network request, but it received no response. */ @@ -1601,13 +1901,10 @@ enum class TalerErrorCode(val code: Int) { /** The signature on a coin by the exchange's denomination key is invalid after unblinding it. */ WALLET_EXCHANGE_COIN_SIGNATURE_INVALID(7009), - /** The exchange does not know about the reserve (yet), and thus withdrawal can't progress. */ - WALLET_EXCHANGE_WITHDRAW_RESERVE_UNKNOWN_AT_EXCHANGE(7010), - /** The wallet core service is not available. */ WALLET_CORE_NOT_AVAILABLE(7011), - /** The bank has aborted a withdrawal operation, and thus a withdrawal can't complete. */ + /** The bank aborted a withdrawal operation, so the withdrawal cannot complete. */ WALLET_WITHDRAWAL_OPERATION_ABORTED_BY_BANK(7012), /** An HTTP request made by the wallet timed out. */ @@ -1634,7 +1931,7 @@ enum class TalerErrorCode(val code: Int) { /** The contract terms given by the merchant are malformed. */ WALLET_CONTRACT_TERMS_MALFORMED(7020), - /** A pending operation failed, and thus the request can't be completed. */ + /** A pending operation failed, so the request cannot be completed. */ WALLET_PENDING_OPERATION_FAILED(7021), /** A payment was attempted, but the merchant had an internal server error (5xx). */ @@ -1670,16 +1967,16 @@ enum class TalerErrorCode(val code: Int) { /** An exchange that is required for some request is currently not available. */ WALLET_EXCHANGE_UNAVAILABLE(7032), - /** An exchange entry is still used by the exchange, thus it can't be deleted without purging. */ + /** An exchange entry is still used by the exchange, so it cannot be deleted without purging. */ WALLET_EXCHANGE_ENTRY_USED(7033), /** The wallet database is unavailable and the wallet thus is not operational. */ WALLET_DB_UNAVAILABLE(7034), - /** A taler:// URI is malformed and can't be parsed. */ + /** A `taler://` URI is malformed and cannot be parsed. */ WALLET_TALER_URI_MALFORMED(7035), - /** A wallet-core request was cancelled and thus can't provide a response. */ + /** A wallet-core request was cancelled and therefore cannot provide a response. */ WALLET_CORE_REQUEST_CANCELLED(7036), /** A wallet-core request failed because the user needs to first accept the exchange's terms of service. */ @@ -1721,28 +2018,91 @@ enum class TalerErrorCode(val code: Int) { /** The order could not be found. Maybe the merchant deleted it. */ WALLET_MERCHANT_ORDER_NOT_FOUND(7049), - /** The HTTP server failed to allocate memory. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ - GENERIC_ALLOCATION_FAILURE(71), + /** The wallet's balance for paying a merchant is insufficient. */ + WALLET_PAY_MERCHANT_INSUFFICIENT_BALANCE(7050), - /** The HTTP server failed to allocate memory for building JSON reply. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ - GENERIC_JSON_ALLOCATION_FAILURE(72), + /** The wallet does not have a purchase for the requested order. */ + WALLET_PURCHASE_NOT_FOUND(7051), - /** The HTTP server failed to allocate memory for making a CURL request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate. */ - GENERIC_CURL_ALLOCATION_FAILURE(73), + /** The wallet does not have a transaction with the requested transaction identifier. */ + WALLET_TRANSACTION_NOT_FOUND(7052), - /** The backend could not locate a required template to generate an HTML reply. The system administrator should check if the resource files are installed in the correct location and are readable to the service. */ - GENERIC_FAILED_TO_LOAD_TEMPLATE(74), + /** The requested action is not supported for this type of transaction. */ + WALLET_TRANSACTION_ACTION_UNSUPPORTED(7053), - /** The backend could not expand the template to generate an HTML reply. The system administrator should investigate the logs and check if the templates are well-formed. */ - GENERIC_FAILED_TO_EXPAND_TEMPLATE(75), + /** The operation would exceed a limit imposed by the exchange that the user cannot raise by completing a KYC process. */ + WALLET_KYC_LIMIT_EXCEEDED(7054), + + /** The wallet does not know an exchange that can be used for this operation. Check that an exchange for the requested currency has been added to the wallet. */ + WALLET_NO_SUITABLE_EXCHANGE(7055), + + /** The wallet does not have a known bank account with the requested identifier. */ + WALLET_BANK_ACCOUNT_NOT_FOUND(7056), + + /** The exchange does not know the contract of this peer-to-peer payment. It may have expired. */ + WALLET_PEER_CONTRACT_NOT_FOUND(7057), + + /** The purse of this peer-to-peer push payment is gone. The sender likely aborted the payment. */ + WALLET_PEER_PUSH_CREDIT_PURSE_GONE(7058), + + /** This invoice has already been paid, possibly by another wallet. */ + WALLET_PEER_PULL_DEBIT_ALREADY_PAID(7059), + + /** The tokens can not be deleted, as at least one of them is currently being used in a transaction. */ + WALLET_TOKENS_IN_USE(7060), + + /** The operation is not supported by the database backend that the wallet is currently running on. */ + WALLET_DB_BACKEND_UNSUPPORTED(7061), + + /** The wallet could not use the mailbox service. */ + WALLET_MAILBOX_UNAVAILABLE(7062), + + /** The wallet could not register an alias with the directory service. */ + WALLET_ALIAS_REGISTRATION_FAILED(7063), + + /** The contract terms use a feature that this version of the wallet does not support. Updating the wallet may help. */ + WALLET_CONTRACT_TERMS_UNSUPPORTED(7064), + + /** The exchange served data that is not correctly signed by its master key. The wallet refuses to use this exchange. */ + 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. */ + 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. */ + WALLET_EXCHANGE_NO_KEY_CHANGE_PENDING(7067), + + /** The key set that was confirmed is not the one that the exchange currently presents. */ + WALLET_EXCHANGE_KEY_CHANGE_MISMATCH(7068), - /** We encountered a timeout with our payment backend. */ + /** The values of a reviewed peer push payment changed before confirmation. The caller must prepare and show the payment again. */ + WALLET_PEER_PUSH_PAYMENT_QUOTE_CHANGED(7069), + + /** The operation was completed or taken over by another wallet. */ + WALLET_TRANSACTION_COMPLETED_BY_OTHER_WALLET(7070), + + /** Refreshing one or more coins failed permanently. */ + WALLET_REFRESH_GROUP_FAILED(7071), + + /** Recouping one or more revoked coins failed permanently. */ + WALLET_RECOUP_GROUP_FAILED(7072), + + /** One or more refunds were permanently rejected by the exchange. */ + WALLET_REFUND_GROUP_FAILED(7073), + + /** Recovery of the transaction inputs failed or the recovery operation is missing. */ + WALLET_TRANSACTION_RECOVERY_FAILED(7074), + + /** An operation required to complete the transaction failed or is missing. */ + WALLET_TRANSACTION_DEPENDENCY_FAILED(7075), + + /** The service encountered a timeout with its payment backend. */ ANASTASIS_GENERIC_BACKEND_TIMEOUT(8000), /** The backend requested payment, but the request is malformed. */ ANASTASIS_GENERIC_INVALID_PAYMENT_REQUEST(8001), - /** The backend got an unexpected reply from the payment processor. */ + /** The backend received an unexpected response from the payment processor. */ ANASTASIS_GENERIC_BACKEND_ERROR(8002), /** The \"Content-length\" field for the upload is missing. */ @@ -1787,13 +2147,13 @@ enum class TalerErrorCode(val code: Int) { /** The authorization succeeded, but the key share is no longer available. */ ANASTASIS_TRUTH_KEY_SHARE_GONE(8115), - /** The backend forgot the order we asked the client to pay for */ + /** The backend no longer knows about the order that the client was asked to pay for. */ ANASTASIS_TRUTH_ORDER_DISAPPEARED(8116), /** The backend itself reported a bad exchange interaction. */ ANASTASIS_TRUTH_BACKEND_EXCHANGE_BAD(8117), - /** The backend reported a payment status we did not expect. */ + /** The backend reported an unexpected payment status. */ ANASTASIS_TRUTH_UNEXPECTED_PAYMENT_STATUS(8118), /** The backend failed to setup the order for payment. */ @@ -1826,10 +2186,10 @@ enum class TalerErrorCode(val code: Int) { /** The provided email address is not an acceptable address. */ ANASTASIS_EMAIL_INVALID(8210), - /** Failed to run the E-mail transmission helper process. */ + /** Failed to run the email transmission helper process. */ ANASTASIS_EMAIL_HELPER_EXEC_FAILED(8211), - /** Provider failed to send E-mail. Helper terminated with a non-successful result. */ + /** The provider failed to send email. The helper terminated with a non-successful result. */ ANASTASIS_EMAIL_HELPER_COMMAND_FAILED(8212), /** The provided postal address is not an acceptable address. */ @@ -1853,6 +2213,12 @@ enum class TalerErrorCode(val code: Int) { /** The key provided does not satisfy the format restrictions for an Anastasis TOTP key. */ ANASTASIS_TOTP_KEY_INVALID(8241), + /** The address is valid but the recipient could not be reached: the handset is switched off or out of coverage, or the message expired before delivery. Retrying later may succeed. Used by all authorization methods that transmit a challenge via an external helper. */ + ANASTASIS_ADDRESS_UNREACHABLE(8250), + + /** The transmission helper is misconfigured: a required credential is absent, the configured credentials were refused by the provider, or the provider account has insufficient balance. The provider operator should check the logs and the service configuration. Used by all authorization methods that transmit a challenge via an external helper. */ + ANASTASIS_HELPER_MISCONFIGURED(8251), + /** The given if-none-match header is malformed. */ ANASTASIS_POLICY_BAD_IF_NONE_MATCH(8301), @@ -1886,10 +2252,10 @@ enum class TalerErrorCode(val code: Int) { /** The given input and action do not work for the current state. */ ANASTASIS_REDUCER_INPUT_INVALID_FOR_STATE(8404), - /** We experienced an unexpected failure interacting with the backend. */ + /** The service experienced an unexpected failure while interacting with the backend. */ ANASTASIS_REDUCER_BACKEND_FAILURE(8405), - /** The contents of a resource file did not match our expectations. */ + /** The contents of a resource file did not match the expected format. */ ANASTASIS_REDUCER_RESOURCE_MALFORMED(8406), /** A required resource file is missing. */ @@ -1901,7 +2267,7 @@ enum class TalerErrorCode(val code: Int) { /** An input did not match the custom validation logic. */ ANASTASIS_REDUCER_INPUT_VALIDATION_FAILED(8409), - /** Our attempts to download the recovery document failed with all providers. Most likely the personal information you entered differs from the information you provided during the backup process and you should go back to the previous step. Alternatively, if you used a backup provider that is unknown to this application, you should add that provider manually. */ + /** Attempts to download the recovery document failed with all providers. The personal information may differ from the information provided during the backup process. Alternatively, the backup may use a provider that is unknown to this application and must be added manually. */ ANASTASIS_REDUCER_POLICY_LOOKUP_FAILED(8410), /** Anastasis provider reported a fatal failure. */ @@ -1910,10 +2276,10 @@ enum class TalerErrorCode(val code: Int) { /** Anastasis provider failed to respond to the configuration request. */ ANASTASIS_REDUCER_PROVIDER_CONFIG_FAILED(8412), - /** The policy we downloaded is malformed. Must have been a client error while creating the backup. */ + /** The downloaded policy is malformed. This was likely caused by a client error while creating the backup. */ ANASTASIS_REDUCER_POLICY_MALFORMED(8413), - /** We failed to obtain the policy, likely due to a network issue. */ + /** The policy could not be obtained, likely due to a network issue. */ ANASTASIS_REDUCER_NETWORK_FAILED(8414), /** The recovered secret did not match the required syntax. */ @@ -1925,7 +2291,7 @@ enum class TalerErrorCode(val code: Int) { /** The provided core secret is too large for some of the providers. */ ANASTASIS_REDUCER_SECRET_TOO_BIG(8417), - /** The provider returned in invalid configuration. */ + /** The provider returned an invalid configuration. */ ANASTASIS_REDUCER_PROVIDER_INVALID_CONFIG(8418), /** The reducer encountered an internal error, likely a bug that needs to be reported. */ @@ -1934,6 +2300,9 @@ enum class TalerErrorCode(val code: Int) { /** The reducer already synchronized with all providers. */ ANASTASIS_REDUCER_PROVIDERS_ALREADY_SYNCED(8420), + /** The requested operation is not valid for the cipher used by the selected denomination. */ + DONAU_GENERIC_INVALID_DENOMINATION_CIPHER_FOR_OPERATION(8606), + /** The Donau failed to perform the operation as it could not find the private keys. This is a problem with the Donau setup, not with the client's request. */ DONAU_GENERIC_KEYS_MISSING(8607), @@ -1967,13 +2336,25 @@ enum class TalerErrorCode(val code: Int) { /** The client reused a unique donor identifier nonce, which is not allowed. */ DONAU_DONOR_IDENTIFIER_NONCE_REUSE(8617), - /** A generic error happened in the LibEuFin nexus. See the enclose details JSON for more information. */ + /** A charity with the same public key is already registered. */ + DONAU_CHARITY_PUB_EXISTS(8618), + + /** The donation unit has expired and cannot be used any longer. */ + DONAU_GENERIC_DONATION_UNIT_EXPIRED(8619), + + /** The donation unit is not yet valid. The client should repeat the request in the future when it might succeed. */ + DONAU_GENERIC_DONATION_UNIT_TOO_EARLY(8620), + + /** The donation unit is not valid for the year specified by the client. */ + DONAU_GENERIC_DONATION_UNIT_WRONG_YEAR(8621), + + /** A generic error occurred in the LibEuFin nexus. See the enclosed details JSON for more information. */ LIBEUFIN_NEXUS_GENERIC_ERROR(9000), /** An uncaught exception happened in the LibEuFin nexus service. */ LIBEUFIN_NEXUS_UNCAUGHT_EXCEPTION(9001), - /** A generic error happened in the LibEuFin sandbox. See the enclose details JSON for more information. */ + /** A generic error occurred in the LibEuFin sandbox. See the enclosed details JSON for more information. */ LIBEUFIN_SANDBOX_GENERIC_ERROR(9500), /** An uncaught exception happened in the LibEuFin sandbox service. */ @@ -1985,7 +2366,7 @@ enum class TalerErrorCode(val code: Int) { /** Number of allowed attempts for initiating a challenge exceeded. */ 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. */ CHALLENGER_GENERIC_CLIENT_UNKNOWN(9750), /** The client is not authorized to use the given redirect URI. */ @@ -1994,36 +2375,101 @@ enum class TalerErrorCode(val code: Int) { /** The service failed to execute its helper process to send the challenge. */ 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). */ CHALLENGER_GRANT_UNKNOWN(9753), /** The code given is not even well-formed. */ CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE(9754), - /** The service is not aware of the referenced validation process. */ + /** The service is not aware of the referenced validation process, or it has expired. */ 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. */ CHALLENGER_CLIENT_FORBIDDEN_INVALID_CODE(9756), /** Too many attempts have been made, validation is temporarily disabled for this address. */ CHALLENGER_TOO_MANY_ATTEMPTS(9757), - /** The PIN code provided is incorrect. */ + /** The TAN code provided is incorrect. */ 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. */ CHALLENGER_MISSING_ADDRESS(9759), /** The client is not allowed to change the address being validated. */ 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. */ + CHALLENGER_NO_CHALLENGE_TRANSMITTED(9761), + + /** An address field does not match the regular expression configured for it. The detail names the offending field. */ + 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. */ + 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. */ + 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. */ + CHALLENGER_TOO_MANY_PIN_TRANSMISSIONS(9765), + + /** The number of attempts to enter the TAN has been exhausted. The user may still request a retransmission or change the address. */ + CHALLENGER_NO_PIN_ATTEMPTS_LEFT(9766), + + /** Authentication of the client failed: the presented client identifier and client secret do not match a registered client. This response is returned when the endpoint authenticates the client, so it challenges the client for credentials. */ + CHALLENGER_CLIENT_AUTHENTICATION_FAILED(9767), + + /** The access token presented is malformed, unknown or expired. Malformed and unknown tokens are deliberately not distinguished. */ + CHALLENGER_TOKEN_UNKNOWN(9768), + + /** The transmission helper rejected the address the user provided: it is malformed, of the wrong length, not a mobile subscription, unallocated, or blocked. The user should correct the address and try again. */ + CHALLENGER_ADDRESS_UNUSABLE(9769), + + /** The address is valid but the recipient could not be reached: the handset is switched off or out of coverage, or the message expired before delivery. Retrying later may succeed. */ + CHALLENGER_ADDRESS_UNREACHABLE(9770), + + /** The transmission helper is misconfigured: a required credential is absent, the configured credentials were refused by the provider, or the provider account has insufficient balance. The operator should check the logs and the service configuration. */ + CHALLENGER_HELPER_MISCONFIGURED(9771), + + /** The validation failed permanently: the user exhausted all address changes, TAN transmissions and TAN attempts. The validation cannot succeed anymore; the user must be sent back to the client, which has to start a new validation if it wants to try again. */ + CHALLENGER_VALIDATION_FAILED(9772), + + /** The request is invalid as the specified order is unpaid. The client should only call this endpoint after paying the order. */ + PAIVANA_PAYMENT_MISSING(9800), + + /** The merchant backend refused the request to check the payment status. The backend is either unavailable or Paivana is misconfigured. The system administrator should check the logs. */ + PAIVANA_BACKEND_REFUSED(9801), + + /** The order specified in the request is unknown to the backend. The client must instantiate the Paivana template first and pay the order before calling this endpoint. */ + PAIVANA_ORDER_UNKNOWN(9802), + + /** The merchant backend returned an unexpected status code. This is probably a protocol incompatibility that should be reported to the developers. */ + PAIVANA_BACKEND_ERROR(9803), + + /** Paivana failed to initialize the request to check the payment status. This should never happen. The system administrator should consult the logs. */ + PAIVANA_GET_ORDER_FAILED(9804), + + /** The specified order does not match the specified Website or nonce and thus the order is invalid for the given request. Clients should pay for the correct order for access to the resource. */ + PAIVANA_WRONG_ORDER(9805), + + /** The specified expiration time for the cookie is longer than what the purchase allows. The request may succeed with a shorter expiration time. Alternatively, the user may need to purchase access again. */ + PAIVANA_TOO_LATE(9806), + + /** The payment template specified in the request is unknown to the backend. */ + PAIVANA_TEMPLATE_UNKNOWN(9807), + + /** The paywall functionality is currently disabled. Thus, proofs of payment are unnecessary and also not supported. */ + 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. */ + PAIVANA_INVALID_TARGET(9809), + /** End of error code range. */ END(9999), } @OptIn(ExperimentalSerializationApi::class) -@Serializer(forClass = TalerErrorCode::class) object TalerErrorCodeSerializer : KSerializer<TalerErrorCode> { override val descriptor = @@ -2031,7 +2477,7 @@ object TalerErrorCodeSerializer : KSerializer<TalerErrorCode> { override fun deserialize(decoder: Decoder): TalerErrorCode { val code = decoder.decodeInt() - return enumValues<TalerErrorCode>().firstOrNull { + return enumEntries<TalerErrorCode>().firstOrNull { code == it.code } ?: TalerErrorCode.UNKNOWN }