commit c2e320d222823269314e776a566c9d66261f580a
parent 09dc2f98a23a3fe0fdd0405f62ad4fe49c88cbea
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 13 Aug 2026 20:16:17 +0200
handle KYC provider failures better
Diffstat:
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_get-kyc-proof-PROVIDER_NAME.c b/src/exchange/taler-exchange-httpd_get-kyc-proof-PROVIDER_NAME.c
@@ -352,8 +352,18 @@ proof_cb (
GNUNET_log (GNUNET_ERROR_TYPE_INFO,
"KYC process #%llu succeeded with KYC provider\n",
(unsigned long long) kpc->process_row);
- GNUNET_assert (json_is_string (json_object_get (attributes,
- "FORM_ID")));
+ if (! json_is_string (json_object_get (attributes,
+ "FORM_ID")))
+ {
+ /* Success without the mandatory FORM_ID attribute: the
+ provider (or the logic talking to it) misbehaved. */
+ GNUNET_break (0);
+ proof_finish (
+ kpc,
+ TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_UNEXPECTED_REPLY,
+ "FORM_ID");
+ break;
+ }
qs = TEH_kyc_store_attributes (
kpc->process_row,
&kpc->h_payto,
diff --git a/src/kyclogic/plugin_kyclogic_oauth2.c b/src/kyclogic/plugin_kyclogic_oauth2.c
@@ -1449,6 +1449,7 @@ handle_curl_login_finished (void *cls,
json_t *body;
GNUNET_break_op (0);
+ ph->status = TALER_KYCLOGIC_STATUS_PROVIDER_FAILED;
ph->http_status
= MHD_HTTP_BAD_GATEWAY;
body = GNUNET_JSON_PACK (
@@ -1477,6 +1478,7 @@ handle_curl_login_finished (void *cls,
json_t *body;
GNUNET_break_op (0);
+ ph->status = TALER_KYCLOGIC_STATUS_PROVIDER_FAILED;
ph->http_status = MHD_HTTP_BAD_GATEWAY;
body = GNUNET_JSON_PACK (
GNUNET_JSON_pack_object_incref ("server_response",
@@ -1512,6 +1514,7 @@ handle_curl_login_finished (void *cls,
json_t *body;
GNUNET_break_op (0);
+ ph->status = TALER_KYCLOGIC_STATUS_PROVIDER_FAILED;
ph->http_status = MHD_HTTP_BAD_GATEWAY;
body = GNUNET_JSON_PACK (
GNUNET_JSON_pack_object_incref ("server_response",