exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit f38dd331412263e9d9dbe8f7270fbc8f3fde48e6
parent 1b0f326dde0586ea6b0489d692c5a5a3adf0d318
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Mon, 14 Apr 2025 15:12:53 +0200

taler-exchange-offline: improve error message (#9727)

Diffstat:
Msrc/exchange-tools/taler-exchange-offline.c | 23++++++++++++++++-------
Msrc/exchange/taler-exchange-httpd_kyc-info.c | 12++++++++++++
Msrc/exchange/taler-exchange-httpd_kyc-start.c | 21+++++++++++++++++++++
3 files changed, 49 insertions(+), 7 deletions(-)

diff --git a/src/exchange-tools/taler-exchange-offline.c b/src/exchange-tools/taler-exchange-offline.c @@ -3509,15 +3509,24 @@ do_set_global_fee (char *const *args) global_ret = EXIT_INVALIDARGUMENT; return; } - if ( (GNUNET_OK != - GNUNET_STRINGS_fancy_time_to_relative (args[4], - &purse_timeout)) || - (GNUNET_OK != - GNUNET_STRINGS_fancy_time_to_relative (args[5], - &history_expiration)) ) + if (GNUNET_OK != + GNUNET_STRINGS_fancy_time_to_relative (args[4], + &purse_timeout)) + { + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Invalid purse timeout `%s' given for 'global-fee' subcommand\n", + args[4]); + GNUNET_SCHEDULER_shutdown (); + global_ret = EXIT_INVALIDARGUMENT; + return; + } + if (GNUNET_OK != + GNUNET_STRINGS_fancy_time_to_relative (args[5], + &history_expiration)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Invalid delay given for 'global-fee' subcommand\n"); + "Invalid history expiratoin `%s' given for 'global-fee' subcommand\n", + args[5]); GNUNET_SCHEDULER_shutdown (); global_ret = EXIT_INVALIDARGUMENT; return; diff --git a/src/exchange/taler-exchange-httpd_kyc-info.c b/src/exchange/taler-exchange-httpd_kyc-info.c @@ -390,6 +390,18 @@ resume_with_reply (struct KycPoller *kyp, ename); return; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Found required check `%s' with program `%s'\n", + check_name, + prog_name); + if (NULL != context) + { + json_dumpf (context, + stderr, + JSON_INDENT (2)); + fprintf (stderr, + "\n"); + } kri = TALER_KYCLOGIC_measure_to_requirement ( check_name, prog_name, diff --git a/src/exchange/taler-exchange-httpd_kyc-start.c b/src/exchange/taler-exchange-httpd_kyc-start.c @@ -355,6 +355,14 @@ TEH_handler_kyc_start ( TALER_EC_EXCHANGE_KYC_FORM_ALREADY_UPLOADED, rc->url); } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Found pending legitimization %llu with measures\n", + (unsigned long long) kyp->legitimization_measure_serial_id); + json_dumpf (kyp->jmeasures, + stderr, + JSON_INDENT (2)); + fprintf (stderr, + "\n"); { struct TALER_KycMeasureAuthorizationHash shv2; @@ -396,6 +404,19 @@ TEH_handler_kyc_start ( return MHD_YES; } + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "Selected measure is %llu with check `%s'\n", + (unsigned long long) kyp->measure_index, + check_name); + if (NULL != context) + { + json_dumpf (context, + stderr, + JSON_INDENT (2)); + fprintf (stderr, + "\n"); + } + provider = TALER_KYCLOGIC_check_to_provider ( check_name); if (NULL == provider)