[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] branch master updated: fix error handling -- for one c
From: |
gnunet |
Subject: |
[taler-anastasis] branch master updated: fix error handling -- for one case |
Date: |
Fri, 06 Nov 2020 10:37:26 +0100 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository anastasis.
The following commit(s) were added to refs/heads/master by this push:
new ff17f55 fix error handling -- for one case
ff17f55 is described below
commit ff17f5545a12f119a1b3544ba50f321ed4ff59e2
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Fri Nov 6 10:37:24 2020 +0100
fix error handling -- for one case
---
src/lib/anastasis_api_backup_redux.c | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/src/lib/anastasis_api_backup_redux.c
b/src/lib/anastasis_api_backup_redux.c
index a1b9af5..6111c0a 100644
--- a/src/lib/anastasis_api_backup_redux.c
+++ b/src/lib/anastasis_api_backup_redux.c
@@ -37,6 +37,25 @@ static const char *backup_strings[] = {
#undef GENERATE_STRING
+void
+ANASTASIS_redux_fail (ANASTASIS_ActionCallback cb,
+ void *cb_cls,
+ enum TALER_ErrorCode ec,
+ const char *detail)
+{
+ json_t *estate;
+
+ estate = json_pack ("{s:s, s:I, s:s}",
+ "detail", detail,
+ "code", (json_int_t) ec,
+ "hint", TALER_ErrorCode_get_hint (ec));
+ cb (cb_cls,
+ ec,
+ estate);
+ json_decref (estate);
+}
+
+
enum ANASTASIS_BackupState
ANASTASIS_backup_state_from_string (const char *state_string)
{
@@ -799,9 +818,9 @@ ANASTASIS_backup_action_ (struct GNUNET_CURL_Context *ctx,
cb_cls);
}
}
- GNUNET_break (0);
- cb (cb_cls,
- ANASTASIS_EC_INVALID, // FIXME: Define correct error code
- NULL);
+ ANASTASIS_redux_fail (cb,
+ cb_cls,
+ TALER_EC_ANASTASIS_REDUCER_ACTION_INVALID,
+ action);
return NULL;
}
--
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: fix error handling -- for one case,
gnunet <=