diff options
author | Christian Grothoff <christian@grothoff.org> | 2016-10-20 21:00:40 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2016-10-20 21:00:40 +0200 |
commit | 7341b21fa3d6328f2c85747824899be54668e891 (patch) | |
tree | ec9617287fe3514c377dbe06437cd33da6ba1c22 /src/exchange-lib/exchange_api_common.h | |
parent | e7875fb26145fcf90aaec4aa8bcb75ace0b40779 (diff) |
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.h | 12 |
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. * |