summaryrefslogtreecommitdiff
path: root/src/include/taler_json_lib.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-11-29 10:52:45 +0100
committerChristian Grothoff <christian@grothoff.org>2019-11-29 10:52:45 +0100
commit636488c2797b498c8861bc6864539a63323b3608 (patch)
tree11b0f04aa31c40a0736babf5ee0a4d0d29682a32 /src/include/taler_json_lib.h
parent970e3fd4cb4a3f76d1bcf56e4cec668bcb828078 (diff)
parent785f5fb7dd5f8e4aa0258e3e72f519c77942cb7d (diff)
downloadexchange-636488c2797b498c8861bc6864539a63323b3608.tar.gz
exchange-636488c2797b498c8861bc6864539a63323b3608.tar.bz2
exchange-636488c2797b498c8861bc6864539a63323b3608.zip
merge error codes
Diffstat (limited to 'src/include/taler_json_lib.h')
-rw-r--r--src/include/taler_json_lib.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/include/taler_json_lib.h b/src/include/taler_json_lib.h
index 382bb19ee..6adb76b24 100644
--- a/src/include/taler_json_lib.h
+++ b/src/include/taler_json_lib.h
@@ -126,6 +126,19 @@ enum TALER_ErrorCode
TALER_JSON_get_error_code (const json_t *json);
+/**
+ * Extract the Taler error code from the given @a data object, which is expected to be in JSON.
+ * Note that #TALER_EC_INVALID is returned if no "code" is present or if @a data is not in JSON.
+ *
+ * @param data response to extract the error code from
+ * @param data_size number of bytes in @a data
+ * @return the "code" value from @a json
+ */
+enum TALER_ErrorCode
+TALER_JSON_get_error_code2 (const void *data,
+ size_t data_size);
+
+
/* **************** /wire account offline signing **************** */
/**