commit c1fa9b535579b5053ab6146ea45fcff0eb29138f
parent a875b291b1ab0f639bc5557ff7811648652cad36
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 5 Apr 2026 00:16:09 +0200
fix misc. minor specification inconsistencies
Diffstat:
4 files changed, 43 insertions(+), 37 deletions(-)
diff --git a/core/exchange/get-kyc-check-H_NORMALIZED_PAYTO.rst b/core/exchange/get-kyc-check-H_NORMALIZED_PAYTO.rst
@@ -126,9 +126,7 @@
// Access token needed to construct the ``/kyc-spa/``
// URL that the user should open in a browser to
- // proceed with the KYC process (optional if the status
- // type is ``200 Ok``, mandatory if the HTTP status
- // is ``202 Accepted``).
+ // proceed with the KYC process.
access_token: AccountAccessToken;
// Array with limitations that currently apply to this
diff --git a/core/exchange/get-transfers-WTID.rst b/core/exchange/get-transfers-WTID.rst
@@ -4,8 +4,6 @@
wire transfer identifier (WTID) and the base URL for tracking
the wire transfer are both given in the wire transfer subject.
- **Request:**
-
**Response:**
:http:statuscode:`200 OK`:
@@ -17,6 +15,15 @@
a code of ``TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_MALFORMED``.
:http:statuscode:`404 Not found`:
The wire transfer identifier is unknown to the exchange.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_NOT_FOUND``.
+ :http:statuscode:`500 Internal server error`:
+ The exchange encountered an internal problem processing
+ the request. Error codes used are:
+ - ``TALER_EC_GENERIC_DB_FETCH_FAILED``
+ - ``TALER_EC_GENERIC_DB_INVARIANT_FAILURE``
+ - ``TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_NOT_FOUND``
+ - ``TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_INCONSISTENT``
.. ts:def:: TrackTransferResponse
diff --git a/core/exchange/post-coins-COIN_PUB-refund.rst b/core/exchange/post-coins-COIN_PUB-refund.rst
@@ -10,29 +10,53 @@
:http:statuscode:`200 OK`:
The operation succeeded, the exchange confirms that the coin can now be refreshed. The response will include a `RefundSuccess` object.
+ :http:statuscode:`400 Bad request`:
+ The request is somehow not following the protocol.
+ Returned with error codes of:
+ - ``TALER_EC_EXCHANGE_REFUND_FEE_TOO_LOW``
+ - ``TALER_EC_EXCHANGE_REFUND_FEE_ABOVE_AMOUNT``
:http:statuscode:`403 Forbidden`:
Merchant signature is invalid.
This response comes with a standard `ErrorDetail` response.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_REFUND_MERCHANT_SIGNATURE_INVALID``.
:http:statuscode:`404 Not found`:
The refund operation failed as we could not find a matching deposit operation (coin, contract, transaction ID and merchant public key must all match).
This response comes with a standard `ErrorDetail` response.
+ Returned with an error code of
+ - ``TALER_EC_EXCHANGE_REFUND_DEPOSIT_NOT_FOUND`` or
+ - ``TALER_EC_EXCHANGE_REFUND_COIN_NOT_FOUND``
:http:statuscode:`409 Conflict`:
- The exchange has previously received a refund request for the same coin, merchant and contract, but specifying a different amount for the same refund transaction ID. The response will be a `RefundFailure` object.
+ This response comes with a standard `ErrorDetail` response.
+ There are several possible error codes:
+ - ``TALER_EC_EXCHANGE_REFUND_CONFLICT_DEPOSIT_INSUFFICIENT``:
+ The requested amount for the refund exceeds the deposit value.
+ -
+ The exchange has previously received a refund request for the same coin,
+ merchant and contract, but specifying a different amount for the same
+ refund transaction ID.
:http:statuscode:`410 Gone`:
It is too late for a refund by the exchange, the money was already sent to the merchant.
This response comes with a standard `ErrorDetail` response.
- :http:statuscode:`412 Precondition failed`:
- The request transaction ID is identical to a previous refund request by the same
- merchant for the same coin and contract, but the refund amount differs. (The
- failed precondition is that the ``rtransaction_id`` is not unique.)
- The response will be a `RefundFailure` object with the conflicting refund request.
+ Returned with an error code of
+ ``TALER_EC_EXCHANGE_REFUND_MERCHANT_ALREADY_PAID``.
:http:statuscode:`413 Request entity too large`:
The uploaded body is to long, it exceeds the size limit.
Returned with an error code of
``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``.
- :http:statuscode:`424 Failed Dependency`:
- A dependency of the refund operation failed.
- This response comes with a standard `ErrorDetail` response.
+ :http:statuscode:`424 Failed dependency`:
+ The request transaction ID is identical to a previous refund request by the same
+ merchant for the same coin and contract, but the refund amount differs. (The
+ failed dependency is that the ``rtransaction_id`` is not unique.)
+ Returned with an error code of:
+ - ``TALER_EC_EXCHANGE_REFUND_INCONSISTENT_AMOUNT``
+ FIXME: consider turning this into a 409 in the future.
+ :http:statuscode:`500 Internal server error`:
+ The server encountered an internal error processing the request.
+ Returned with error codes of:
+ - ``TALER_EC_EXCHANGE_REFUND_MERCHANT_SIGNING_FAILED``
+ - ``TALER_EC_GENERIC_DB_STORE_FAILED``
+ - ``TALER_EC_GENERIC_DB_FETCH_FAILED``
**Details:**
@@ -79,22 +103,3 @@
// which signing key was used.
exchange_pub: EddsaPublicKey;
}
-
- .. ts:def:: RefundFailure
-
- interface RefundFailure {
-
- // Numeric error code unique to the condition, which can be either
- // related to the deposit value being insufficient for the requested
- // refund(s), or the requested refund conflicting due to refund
- // transaction number re-use (with different amounts).
- code: Integer;
-
- // Human-readable description of the error message.
- hint: string;
-
- // Information about the conflicting refund request(s).
- // This will not be the full history of the coin, but only
- // the relevant subset of the transactions.
- history: CoinSpendHistoryItem[];
- }
diff --git a/core/exchange/post-reserves-RESERVE_PUB-open.rst b/core/exchange/post-reserves-RESERVE_PUB-open.rst
@@ -40,10 +40,6 @@
The uploaded body is to long, it exceeds the size limit.
Returned with an error code of
``TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT``.
- :http:statuscode:`451 Unavailable For Legal Reasons`:
- This account has not yet passed the KYC checks.
- The client must pass KYC checks before the reserve can be opened.
- The response will be an `LegitimizationNeededResponse` object.
:http:statuscode:`500 Internal Server Error`:
The exchange encountered an internal error.
This response comes with a standard `ErrorDetail` response.