From 7341b21fa3d6328f2c85747824899be54668e891 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 20 Oct 2016 21:00:40 +0200 Subject: return taler-specific error codes from C API as well (#4497/4705) --- src/exchange-lib/exchange_api_common.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/exchange-lib/exchange_api_common.h') 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 #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. * -- cgit v1.2.3