summaryrefslogtreecommitdiff
path: root/src/reducer
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-12-31 11:37:42 +0100
committerChristian Grothoff <christian@grothoff.org>2021-12-31 11:37:42 +0100
commitce443bb4d4815ac79170b81cae74fc8b8030ea54 (patch)
tree5ad2e67ea4179a4f766c3180bf44b06cc8577f33 /src/reducer
parent9f7a6d50b4c6a79ab16dfabe2c57510565bc4cf2 (diff)
downloadanastasis-ce443bb4d4815ac79170b81cae74fc8b8030ea54.tar.gz
anastasis-ce443bb4d4815ac79170b81cae74fc8b8030ea54.tar.bz2
anastasis-ce443bb4d4815ac79170b81cae74fc8b8030ea54.zip
fix #7054: propagate more information on the rate-limiting
Diffstat (limited to 'src/reducer')
-rw-r--r--src/reducer/anastasis_api_recovery_redux.c16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/reducer/anastasis_api_recovery_redux.c b/src/reducer/anastasis_api_recovery_redux.c
index a26b6ad..088ff7e 100644
--- a/src/reducer/anastasis_api_recovery_redux.c
+++ b/src/reducer/anastasis_api_recovery_redux.c
@@ -765,10 +765,18 @@ answer_feedback_cb (
json_t *err;
err = GNUNET_JSON_PACK (
- GNUNET_JSON_pack_string ("state",
- "rate-limit-exceeded"),
- GNUNET_JSON_pack_uint64 ("error_code",
- TALER_EC_ANASTASIS_TRUTH_RATE_LIMITED));
+ GNUNET_JSON_pack_string (
+ "state",
+ "rate-limit-exceeded"),
+ GNUNET_JSON_pack_uint64 (
+ "request_limit",
+ csr->details.rate_limit_exceeded.request_limit),
+ GNUNET_JSON_pack_time_rel (
+ "request_frequency",
+ csr->details.rate_limit_exceeded.request_frequency),
+ GNUNET_JSON_pack_uint64 (
+ "error_code",
+ TALER_EC_ANASTASIS_TRUTH_RATE_LIMITED));
GNUNET_assert (0 ==
json_object_set_new (feedback,
uuid,