summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-07-08 19:52:51 +0200
committerChristian Grothoff <christian@grothoff.org>2020-07-08 19:52:51 +0200
commit31e66d9753efc06841bdffac0e1897dcdb1d1385 (patch)
tree55b4ddbe690de455a6bef324ab85e747f281d674 /core
parent8236b1e6bd10af0c1eec203a166634416ac11164 (diff)
downloaddocs-31e66d9753efc06841bdffac0e1897dcdb1d1385.tar.gz
docs-31e66d9753efc06841bdffac0e1897dcdb1d1385.tar.bz2
docs-31e66d9753efc06841bdffac0e1897dcdb1d1385.zip
update API specification for #6416
Diffstat (limited to 'core')
-rw-r--r--core/api-exchange.rst33
1 files changed, 23 insertions, 10 deletions
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index b461733e..309e070e 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -625,13 +625,18 @@ denomination.
place. The response will include a `DepositSuccess` object.
:status 401 Unauthorized:
One of the signatures is invalid.
- :status 403 Forbidden:
- The deposit operation has failed because the coin has insufficient
- residual value; the request should not be repeated again with this coin.
- In this case, the response is a `DepositDoubleSpendError`.
:status 404 Not Found:
Either the denomination key is not recognized (expired or invalid) or
the wire type is not recognized.
+ :status 409 Conflict:
+ The deposit operation has either failed because the coin has insufficient
+ residual value, or because the same public key of the coin has been
+ previously used with a different denomination. Which case it is
+ can be decided by looking at the error code
+ (``TALER_EC_DEPOSIT_INSUFFICIENT_FUNDS`` or ``TALER_EC_COIN_CONFLICTING_DENOMINATION_KEY``).
+ The fields of the response are the same in both cases.
+ The request should not be repeated again with this coin.
+ In this case, the response is a `DepositDoubleSpendError`.
**Details:**
@@ -847,12 +852,16 @@ the API during normal operation.
One of the signatures is invalid.
:status 200 OK:
The request was succesful. The response body is `MeltResponse` in this case.
- :status 403 Forbidden:
- The operation is not allowed as at least one of the coins has insufficient funds. The response
- is `MeltForbiddenResponse` in this case.
:status 404:
the exchange does not recognize the denomination key as belonging to the exchange,
or it has expired
+ :status 409 Conflict:
+ The operation is not allowed as the coin has insufficient
+ residual value, or because the same public key of the coin has been
+ previously used with a different denomination. Which case it is
+ can be decided by looking at the error code
+ (``TALER_EC_MELT_INSUFFICIENT_FUNDS`` or ``TALER_EC_COIN_CONFLICTING_DENOMINATION_KEY``).
+ The response is `MeltForbiddenResponse` in both cases.
**Details:**
@@ -1121,13 +1130,17 @@ in using this API.
coin is not lost.
:status 401 Unauthorized:
The coin's signature is invalid.
- :status 403 Forbidden:
- The coin was already used for payment.
- The response is a `DepositDoubleSpendError`.
:status 404 Not Found:
The denomination key is not in the set of denomination
keys where emergency pay back is enabled, or the blinded
coin is not known to have been withdrawn.
+ :status 409 Conflict:
+ The operation is not allowed as the coin has insufficient
+ residual value, or because the same public key of the coin has been
+ previously used with a different denomination. Which case it is
+ can be decided by looking at the error code
+ (``TALER_EC_RECOUP_COIN_BALANCE_ZERO`` or ``TALER_EC_COIN_CONFLICTING_DENOMINATION_KEY``).
+ The response is a `DepositDoubleSpendError`.
**Details:**