diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-01-27 14:10:27 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-01-27 14:10:40 +0100 |
commit | c239ba6f18ee7d62b249c7204dbe50dab37912b8 (patch) | |
tree | 27ccb16a15da81900d5a622417b95c5c172d9dc6 /src/exchange/taler-exchange-httpd_purses_merge.c | |
parent | 7e8e2f43178139b35f726dd0584ef629e1853af8 (diff) |
address DB failure error handling in KYC check
Diffstat (limited to 'src/exchange/taler-exchange-httpd_purses_merge.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_purses_merge.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_merge.c b/src/exchange/taler-exchange-httpd_purses_merge.c index d3bded6e..174131a3 100644 --- a/src/exchange/taler-exchange-httpd_purses_merge.c +++ b/src/exchange/taler-exchange-httpd_purses_merge.c @@ -282,13 +282,26 @@ merge_transaction (void *cls, bool no_partner = true; const char *required; - required = TALER_KYCLOGIC_kyc_test_required ( + qs = TALER_KYCLOGIC_kyc_test_required ( TALER_KYCLOGIC_KYC_TRIGGER_P2P_RECEIVE, &pcc->h_payto, TEH_plugin->select_satisfied_kyc_processes, TEH_plugin->cls, &amount_iterator, - pcc); + pcc, + &required); + 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, + "kyc_test_required"); + return qs; + } if (NULL != required) { pcc->kyc.ok = false; @@ -314,8 +327,7 @@ merge_transaction (void *cls, { if (GNUNET_DB_STATUS_SOFT_ERROR == qs) return qs; - TALER_LOG_WARNING ( - "Failed to store merge purse information in database\n"); + GNUNET_break (0); *mhd_ret = TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, |