commit c82d46cfdc90b37f42318674e23e6e01b91f5f71
parent 86c3900aef29d298276e81b7ac76292c6e8317de
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 28 Mar 2026 21:51:22 +0100
document more error codes
Diffstat:
10 files changed, 82 insertions(+), 16 deletions(-)
diff --git a/core/exchange/delete-purses-PURSE_PUB.rst b/core/exchange/delete-purses-PURSE_PUB.rst
@@ -18,11 +18,25 @@
:http:statuscode:`204 No Content`:
The operation succeeded, the exchange confirms that the purse
was deleted.
+ :http:statuscode:`400 Bad request`:
+ The request was malformed.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_GENERIC_PURSE_PUB_MALFORMED``.
:http:statuscode:`403 Forbidden`:
The signature is invalid.
- This response comes with a standard `ErrorDetail` response.
+ This response comes with a standard `ErrorDetail` response and
+ an error code of ``TALER_EC_EXCHANGE_PURSE_DELETE_SIGNATURE_INVALID``.
:http:statuscode:`404 Not Found`:
The purse is not known. Might have already been deleted previously.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_GENERIC_PURSE_UNKNOWN``.
:http:statuscode:`409 Conflict`:
It is too late to delete the purse, its fate (merge or expiration)
was already decided.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_PURSE_DELETE_ALREADY_DECIDED``.
+ :http:statuscode:`500 Internal server error`:
+ The server encountered an internal error processing the request.
+ Returned with an error code of
+ ``TALER_EC_GENERIC_DB_STORE_FAILED`` or
+ ``TALER_EC_GENERIC_DB_START_FAILED``.
diff --git a/core/exchange/post-aml-OFFICER_PUB-decision.rst b/core/exchange/post-aml-OFFICER_PUB-decision.rst
@@ -11,13 +11,38 @@
:http:statuscode:`204 No content`:
The AML decision has been executed and recorded successfully.
+ :http:statuscode:`400 Bad request`:
+ The request was malformed.
:http:statuscode:`403 Forbidden`:
The signature is invalid (or the AML officer not known).
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_AML_DECISION_ADD_SIGNATURE_INVALID``
:http:statuscode:`404 Not found`:
The normalized payto-address the decision was made for is unknown to the exchange.
+ Returned with an error code of:
+ ``TALER_EC_EXCHANGE_GENERIC_BANK_ACCOUNT_UNKNOWN``
:http:statuscode:`409 Conflict`:
The designated AML account is not enabled or a more recent
decision was already submitted.
+ Returned with an error code of:
+
+ - ``TALER_EC_EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT`` or
+ - ``TALER_EC_EXCHANGE_AML_DECISION_INVALID_OFFICER``
+
+ :http:statuscode:`500 Internal server error`:
+ The server had an internal error processing the request.
+ Returned with one of various error codes, including:
+
+ - ``TALER_EC_EXCHANGE_KYC_GENERIC_AML_LOGIC_BUG``
+ - ``TALER_EC_GENERIC_DB_STORE_FAILED``
+ - ``TALER_EC_EXCHANGE_KYC_RECURSIVE_RULE_DETECTED``
+ - ``TALER_EC_GENERIC_DB_FETCH_FAILED``
+ - ``TALER_EC_GENERIC_DB_COMMIT_FAILED``
+ - ``TALER_EC_EXCHANGE_KYC_AML_PROGRAM_FAILURE``
+ - ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``
+ - ``TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_FAILED``
+ - ``TALER_EC_EXCHANGE_KYC_AML_PROGRAM_MALFORMED_RESULT``
+ - ``TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_UNKNOWN``
**Details:**
@@ -45,7 +70,7 @@
// What are the new account properties?
// New since protocol **v20**.
- properties: AccountProperties;
+ properties?: AccountProperties;
// Array of AML/KYC events to trigger for statistics.
// Note that this information is not covered by the signature
diff --git a/core/exchange/post-batch-deposit.rst b/core/exchange/post-batch-deposit.rst
@@ -131,6 +131,10 @@
// Signature over `TALER_DepositRequestPS`, made by the customer with the
// `coin's private key <coin-priv>`.
coin_sig: EddsaSignature;
+
+ // Hash over the age commitment of the coin.
+ // Only present if the coin is actually age-restricted.
+ h_age_commitment?: HashCode;
}
.. ts:def:: DenominationSignature
@@ -304,16 +308,6 @@
.. ts:def:: DepositSuccessResponse
interface DepositSuccessResponse {
- // Optional base URL of the exchange for looking up wire transfers
- // associated with this transaction. If not given,
- // the base URL is the same as the one used for this request.
- // Can be used if the base URL for ``/transactions/`` differs from that
- // for ``/coins/``, i.e. for load balancing. Clients SHOULD
- // respect the ``transaction_base_url`` if provided. Any HTTP server
- // belonging to an exchange MUST generate a 307 or 308 redirection
- // to the correct base URL should a client uses the wrong base
- // URL, or if the base URL has changed since the deposit.
- transaction_base_url?: string;
// Total amount deposited so far under this contract terms for
// this merchant.
diff --git a/core/exchange/post-coins-COIN_PUB-refund.rst b/core/exchange/post-coins-COIN_PUB-refund.rst
@@ -51,7 +51,7 @@
// `TALER_RefundRequestPS` with purpose
// ``TALER_SIGNATURE_MERCHANT_REFUND``
// affirming the refund.
- merchant_sig: EddsaPublicKey;
+ merchant_sig: EddsaSignature;
}
diff --git a/core/exchange/post-kyc-wallet.rst b/core/exchange/post-kyc-wallet.rst
@@ -36,9 +36,20 @@
:http:statuscode:`403 Forbidden`:
The provided signature is invalid.
This response comes with a standard `ErrorDetail` response.
- :http:statuscode:`451 Unavailable for Legal Reasons`:
- The wallet must undergo a KYC check. A KYC ID was created.
- The response will be a `LegitimizationNeededResponse` object.
+ :http:statuscode:`500 Internal server error`:
+ The server had an internal error processing the request.
+ Returned with one of various error codes, including:
+
+ - ``TALER_EC_EXCHANGE_KYC_GENERIC_AML_LOGIC_BUG``
+ - ``TALER_EC_GENERIC_DB_STORE_FAILED``
+ - ``TALER_EC_EXCHANGE_KYC_RECURSIVE_RULE_DETECTED``
+ - ``TALER_EC_GENERIC_DB_FETCH_FAILED``
+ - ``TALER_EC_GENERIC_DB_COMMIT_FAILED``
+ - ``TALER_EC_EXCHANGE_KYC_AML_PROGRAM_FAILURE``
+ - ``TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE``
+ - ``TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_FAILED``
+ - ``TALER_EC_EXCHANGE_KYC_AML_PROGRAM_MALFORMED_RESULT``
+ - ``TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_UNKNOWN``
**Details:**
diff --git a/core/exchange/post-management-aml-officers.rst b/core/exchange/post-management-aml-officers.rst
@@ -12,8 +12,12 @@
The officer settings have been updated successfully.
:http:statuscode:`403 Forbidden`:
The signature is invalid.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_UPDATE_AML_OFFICER_SIGNATURE_INVALID``
:http:statuscode:`409 Conflict`:
The exchange has previously received a conflicting configuration message.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_AML_OFFICERS_MORE_RECENT_PRESENT``
**Details:**
diff --git a/core/exchange/post-management-auditors-AUDITOR_PUB-disable.rst b/core/exchange/post-management-auditors-AUDITOR_PUB-disable.rst
@@ -17,10 +17,16 @@
The auditor has successfully disabled the auditor. The body is empty.
:http:statuscode:`403 Forbidden`:
The signature is invalid.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_DEL_SIGNATURE_INVALID``,
:http:statuscode:`404 Not found`:
The auditor is unknown to the exchange.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND``.
:http:statuscode:`409 Conflict`:
The exchange has a more recent request related to this auditor key (replay detected).
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_MORE_RECENT_PRESENT``.
**Details:**
diff --git a/core/exchange/post-management-auditors.rst b/core/exchange/post-management-auditors.rst
@@ -12,8 +12,12 @@
The auditor was successfully enabled.
:http:statuscode:`403 Forbidden`:
The master signature is invalid.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_ADD_SIGNATURE_INVALID``.
:http:statuscode:`409 Conflict`:
The exchange has a more recent request related to this auditor key (replay detected).
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_MORE_RECENT_PRESENT``.
**Details:**
diff --git a/core/exchange/post-management-denominations-H_DENOM_PUB-revoke.rst b/core/exchange/post-management-denominations-H_DENOM_PUB-revoke.rst
@@ -14,6 +14,8 @@
The request was successfully processed.
:http:statuscode:`403 Forbidden`:
The provided signature is invalid.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_DENOMINATION_REVOKE_SIGNATURE_INVALID``.
**Details:**
diff --git a/core/exchange/post-management-drain.rst b/core/exchange/post-management-drain.rst
@@ -15,6 +15,12 @@
The profit drain was scheduled.
:http:statuscode:`403 Forbidden`:
The master signature is invalid.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_MANAGEMENT_DRAIN_PROFITS_SIGNATURE_INVALID``.
+ :http:statuscode:`500 Internal server error`:
+ The server encountered an internal error processing the request.
+ Returned with an error code of
+ ``TALER_EC_GENERIC_DB_STORE_FAILED``.
**Details:**