summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_refund.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2019-11-01 15:36:14 +0100
committerChristian Grothoff <christian@grothoff.org>2019-11-01 15:36:14 +0100
commit375a47d5023c9eccf45d8142a0568824eb4ed7ab (patch)
treedab8a343adfd77a8ddcc6a579cecbe918cba095a /src/exchange/taler-exchange-httpd_refund.c
parent40d9674856dd77a98053f0451d76791de146551f (diff)
downloadexchange-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.c12
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 93df54c8..48532a2c 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,