aboutsummaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_reserves_close.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-01-27 14:10:27 +0100
committerChristian Grothoff <christian@grothoff.org>2023-01-27 14:10:40 +0100
commitc239ba6f18ee7d62b249c7204dbe50dab37912b8 (patch)
tree27ccb16a15da81900d5a622417b95c5c172d9dc6 /src/exchange/taler-exchange-httpd_reserves_close.c
parent7e8e2f43178139b35f726dd0584ef629e1853af8 (diff)
address DB failure error handling in KYC check
Diffstat (limited to 'src/exchange/taler-exchange-httpd_reserves_close.c')
-rw-r--r--src/exchange/taler-exchange-httpd_reserves_close.c28
1 files changed, 20 insertions, 8 deletions
diff --git a/src/exchange/taler-exchange-httpd_reserves_close.c b/src/exchange/taler-exchange-httpd_reserves_close.c
index be36f1e7..6ace75fe 100644
--- a/src/exchange/taler-exchange-httpd_reserves_close.c
+++ b/src/exchange/taler-exchange-httpd_reserves_close.c
@@ -231,14 +231,26 @@ reserve_close_transaction (void *cls,
TALER_payto_hash (rcc->payto_uri,
&rcc->kyc_payto);
rcc->qs = GNUNET_DB_STATUS_SUCCESS_NO_RESULTS;
- kyc_needed
- = TALER_KYCLOGIC_kyc_test_required (
- TALER_KYCLOGIC_KYC_TRIGGER_RESERVE_CLOSE,
- &rcc->kyc_payto,
- TEH_plugin->select_satisfied_kyc_processes,
- TEH_plugin->cls,
- &amount_it,
- rcc);
+ qs = TALER_KYCLOGIC_kyc_test_required (
+ TALER_KYCLOGIC_KYC_TRIGGER_RESERVE_CLOSE,
+ &rcc->kyc_payto,
+ TEH_plugin->select_satisfied_kyc_processes,
+ TEH_plugin->cls,
+ &amount_it,
+ rcc,
+ &kyc_needed);
+ if (qs < 0)
+ {
+ if (GNUNET_DB_STATUS_SOFT_ERROR == qs)
+ return qs;
+ GNUNET_break (0);
+ *mhd_ret
+ = TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_GENERIC_DB_FETCH_FAILED,
+ "iterate_reserve_close_info");
+ return qs;
+ }
if (rcc->qs < 0)
{
if (GNUNET_DB_STATUS_SOFT_ERROR == rcc->qs)