summaryrefslogtreecommitdiff
path: root/core/api-exchange.rst
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-05-18 20:01:39 +0200
committerChristian Grothoff <christian@grothoff.org>2021-05-18 20:01:39 +0200
commit81655daf19f3739127cb78d6553cfaf48640e46a (patch)
tree73491899c03eea4ae82a8fd0dcc9e003d611863a /core/api-exchange.rst
parent17d2d92487f398aa95f8a55224eb26ebda2e1ada (diff)
downloaddocs-81655daf19f3739127cb78d6553cfaf48640e46a.tar.gz
docs-81655daf19f3739127cb78d6553cfaf48640e46a.tar.bz2
docs-81655daf19f3739127cb78d6553cfaf48640e46a.zip
more detailed 401 error
Diffstat (limited to 'core/api-exchange.rst')
-rw-r--r--core/api-exchange.rst34
1 files changed, 29 insertions, 5 deletions
diff --git a/core/api-exchange.rst b/core/api-exchange.rst
index 23365ef..06f7658 100644
--- a/core/api-exchange.rst
+++ b/core/api-exchange.rst
@@ -2672,11 +2672,8 @@ Wallet-to-wallet transfers
purse deposits before the expiration deadline.
The response will include a `PurseDepositAccepted` object.
:http:statuscode:`401 Unauthorized`:
- A coin signature is invalid.
- FIXME: add message that tells the client
- which coin signature(s) were valid. ErrorDetail is not enough
- to identify the problematic coin.
- This response comes with a standard `ErrorDetail` response.
+ A coin signature is invalid. The response will
+ include a `PurseDepositSignatureErrorDetail`
:http:statuscode:`403 Forbidden`:
The server is denying the operation as a purse with a
different contract or total amount already exists.
@@ -2916,6 +2913,33 @@ Wallet-to-wallet transfers
}
+ .. ts:def:: PurseDepositSignatureErrorDetail
+
+ interface PurseDepositSignatureErrorDetail {
+ // Taler error code, summarizing the problem.
+ // Note that for problems about specific
+ // coins, the 'coin_error_map' should be consulted.
+ // The 'coin_error_map' will be empty if the
+ // 'purse_sig' was invalid. In this case,
+ // the coins will not even have been checked by
+ // the exchange.
+ code: number;
+
+ // Human-readable description of the error, i.e. "invalid siganture".
+ hint?: string;
+
+ // Total amount contributed by the current request.
+ // Note that some coins may have been successfully
+ // deposited into the purse, so the total amount
+ // from these coins is listed here.
+ total_amount_contributed: Amount;
+
+ // Public keys of coins that could not be deposited
+ // into the purse, mapped to the coin's histories.
+ coin_error_map: EddsaPublicKey -> ErrorDetail[];
+ }
+
+
.. http:POST:: /purses/$PURSE_PUB/merge
Merge purse with account, adding the value of the purse into