[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: return error response instead o
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: return error response instead of tagging state |
Date: |
Wed, 13 Oct 2021 17:31:04 +0200 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new 5dbddaf return error response instead of tagging state
5dbddaf is described below
commit 5dbddafc68643f2b5f03af2fdb10f1cc16d90104
Author: Florian Dold <florian@dold.me>
AuthorDate: Wed Oct 13 17:30:58 2021 +0200
return error response instead of tagging state
---
src/reducer/anastasis_api_recovery_redux.c | 39 +++++++++++++++---------------
1 file changed, 19 insertions(+), 20 deletions(-)
diff --git a/src/reducer/anastasis_api_recovery_redux.c
b/src/reducer/anastasis_api_recovery_redux.c
index 14cb657..85a9c50 100644
--- a/src/reducer/anastasis_api_recovery_redux.c
+++ b/src/reducer/anastasis_api_recovery_redux.c
@@ -2463,31 +2463,30 @@ static void
return_no_policy (struct RecoverSecretState *rss,
bool offline)
{
- json_t *msg;
+ json_t *estate;
+ const char *detail;
+ enum TALER_ErrorCode ec;
+ ec = TALER_EC_ANASTASIS_REDUCER_NETWORK_FAILED;
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"No provider online, need user to manually specify
providers!\n");
- msg = GNUNET_JSON_PACK (
+
+ if (offline)
+ detail = "could not contact provider (offline)";
+ else
+ detail = "provider does not know you";
+
+ estate = GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_allow_null (
+ GNUNET_JSON_pack_string ("detail",
+ detail)),
+ GNUNET_JSON_pack_uint64 ("code",
+ ec),
GNUNET_JSON_pack_string ("hint",
- offline
- ? "could not contact provider"
- : "provider does not know you"),
- GNUNET_JSON_pack_bool ("offline",
- offline));
- GNUNET_assert (0 ==
- json_object_set_new (rss->state,
- "recovery_error",
- msg));
- /* In case there are old ones, remove them! */
- (void) json_object_del (rss->state,
- "recovery_document");
- (void) json_object_del (rss->state,
- "recovery_information");
- set_state (rss->state,
- ANASTASIS_RECOVERY_STATE_SECRET_SELECTING);
+ TALER_ErrorCode_get_hint (ec)));
rss->cb (rss->cb_cls,
- TALER_EC_NONE,
- rss->state);
+ ec,
+ estate);
free_rss (rss);
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-anastasis] branch master updated: return error response instead of tagging state,
gnunet <=