diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-01 15:36:14 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-01 15:36:14 +0100 |
commit | 375a47d5023c9eccf45d8142a0568824eb4ed7ab (patch) | |
tree | dab8a343adfd77a8ddcc6a579cecbe918cba095a /src/exchange/taler-exchange-httpd_refund.c | |
parent | 40d9674856dd77a98053f0451d76791de146551f (diff) | |
download | exchange-375a47d5023c9eccf45d8142a0568824eb4ed7ab.tar.gz exchange-375a47d5023c9eccf45d8142a0568824eb4ed7ab.tar.bz2 exchange-375a47d5023c9eccf45d8142a0568824eb4ed7ab.zip |
improve status codes returned in case of denomination key troubles
Diffstat (limited to 'src/exchange/taler-exchange-httpd_refund.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_refund.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd_refund.c b/src/exchange/taler-exchange-httpd_refund.c index 93df54c8a..48532a2ce 100644 --- a/src/exchange/taler-exchange-httpd_refund.c +++ b/src/exchange/taler-exchange-httpd_refund.c @@ -161,6 +161,8 @@ refund_transaction (void *cls, int deposit_found; int refund_found; int fee_cmp; + unsigned int hc; + enum TALER_ErrorCode ec; dep = NULL; ref = NULL; @@ -354,7 +356,9 @@ refund_transaction (void *cls, } dki = TEH_KS_denomination_key_lookup_by_hash (mks, &dep->coin.denom_pub_hash, - TEH_KS_DKU_DEPOSIT); + TEH_KS_DKU_DEPOSIT, + &ec, + &hc); if (NULL == dki) { /* DKI not found, but we do have a coin with this DK in our database; @@ -363,9 +367,9 @@ refund_transaction (void *cls, TEH_KS_release (mks); TEH_plugin->free_coin_transaction_list (TEH_plugin->cls, tl); - *mhd_ret = TEH_RESPONSE_reply_internal_error (connection, - TALER_EC_REFUND_DENOMINATION_KEY_NOT_FOUND, - "denomination key not found"); + *mhd_ret = TEH_RESPONSE_reply_with_error (connection, + ec, + hc); return GNUNET_DB_STATUS_HARD_ERROR; } TALER_amount_ntoh (&expect_fee, |