[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: return TALER_EC_INVALID instead
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: return TALER_EC_INVALID instead of TALER_EC_NONE when error JSON doesn't contain code |
Date: |
Thu, 23 Jan 2020 15:44:37 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new 26c9563e return TALER_EC_INVALID instead of TALER_EC_NONE when error
JSON doesn't contain code
26c9563e is described below
commit 26c9563ef0719601dfd5ac33c70b277dde7e5326
Author: Florian Dold <address@hidden>
AuthorDate: Thu Jan 23 15:44:33 2020 +0100
return TALER_EC_INVALID instead of TALER_EC_NONE when error JSON doesn't
contain code
---
src/json/json.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/json/json.c b/src/json/json.c
index 807ea0b6..6de29931 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -77,8 +77,13 @@ TALER_JSON_get_error_code (const json_t *json)
return TALER_EC_INVALID_RESPONSE;
}
jc = json_object_get (json, "code");
+ /* The caller already knows that the JSON represents an error,
+ so we are dealing with a missing error code here. */
if (NULL == jc)
- return TALER_EC_NONE;
+ {
+ GNUNET_break_op (0);
+ return TALER_EC_INVALID;
+ }
if (json_is_integer (jc))
return (enum TALER_ErrorCode) json_integer_value (jc);
GNUNET_break_op (0);
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: return TALER_EC_INVALID instead of TALER_EC_NONE when error JSON doesn't contain code,
gnunet <=