From d45774ccecaed85f45c2eebe641e2d2f8c8673af Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 1 Aug 2021 15:36:38 +0200 Subject: introduce TALER_JSON_pack_ec --- src/exchange/taler-exchange-httpd_responses.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_responses.c') diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index e05b537ec..72d1ddb75 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -450,8 +450,7 @@ TEH_RESPONSE_reply_unknown_denom_pub_hash ( return TALER_MHD_REPLY_JSON_PACK ( connection, MHD_HTTP_NOT_FOUND, - GNUNET_JSON_pack_uint64 ("code", - TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN), + TALER_JSON_pack_ec (TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN), GNUNET_JSON_pack_time_abs ("timestamp", now), GNUNET_JSON_pack_data_auto ("exchange_pub", @@ -501,8 +500,7 @@ TEH_RESPONSE_reply_expired_denom_pub_hash ( return TALER_MHD_REPLY_JSON_PACK ( connection, MHD_HTTP_GONE, - GNUNET_JSON_pack_uint64 ("code", - ec), + TALER_JSON_pack_ec (ec), GNUNET_JSON_pack_string ("oper", oper), GNUNET_JSON_pack_time_abs ("timestamp", @@ -550,10 +548,7 @@ TEH_RESPONSE_reply_coin_insufficient_funds ( return TALER_MHD_REPLY_JSON_PACK ( connection, MHD_HTTP_CONFLICT, - GNUNET_JSON_pack_string ("hint", - TALER_ErrorCode_get_hint (ec)), - GNUNET_JSON_pack_uint64 ("code", - ec), + TALER_JSON_pack_ec (ec), GNUNET_JSON_pack_array_steal ("history", history)); } -- cgit v1.2.3