summaryrefslogtreecommitdiff
path: root/src/exchange-lib/exchange_api_common.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-10-20 21:00:40 +0200
committerChristian Grothoff <christian@grothoff.org>2016-10-20 21:00:40 +0200
commit7341b21fa3d6328f2c85747824899be54668e891 (patch)
treeec9617287fe3514c377dbe06437cd33da6ba1c22 /src/exchange-lib/exchange_api_common.h
parente7875fb26145fcf90aaec4aa8bcb75ace0b40779 (diff)
downloadexchange-7341b21fa3d6328f2c85747824899be54668e891.tar.gz
exchange-7341b21fa3d6328f2c85747824899be54668e891.tar.bz2
exchange-7341b21fa3d6328f2c85747824899be54668e891.zip
return taler-specific error codes from C API as well
(#4497/4705)
Diffstat (limited to 'src/exchange-lib/exchange_api_common.h')
-rw-r--r--src/exchange-lib/exchange_api_common.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/exchange-lib/exchange_api_common.h b/src/exchange-lib/exchange_api_common.h
index 5655f5d3b..bea36258e 100644
--- a/src/exchange-lib/exchange_api_common.h
+++ b/src/exchange-lib/exchange_api_common.h
@@ -23,6 +23,18 @@
#include <gnunet/gnunet_util_lib.h>
#include "taler_exchange_service.h"
+
+/**
+ * Extract the Taler error code from the given @a json object.
+ * Note that #TALER_EC_NONE is returned if no "code" is present.
+ *
+ * @param json response to extract the error code from
+ * @return the "code" value from @a json
+ */
+enum TALER_ErrorCode
+TALER_EXCHANGE_json_get_error_code (const json_t *json);
+
+
/**
* Verify a coins transaction history as returned by the exchange.
*