From 0e68462e9040c2cbb536d0b0f797fa2e7aab064a Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Sun, 10 Nov 2024 14:17:09 +0100 Subject: take HTTP status from EC --- src/exchange/taler-exchange-httpd_kyc-proof.c | 3 ++- src/exchange/taler-exchange-httpd_kyc-upload.c | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/exchange/taler-exchange-httpd_kyc-proof.c b/src/exchange/taler-exchange-httpd_kyc-proof.c index 7bf0560cf..55de59825 100644 --- a/src/exchange/taler-exchange-httpd_kyc-proof.c +++ b/src/exchange/taler-exchange-httpd_kyc-proof.c @@ -233,7 +233,8 @@ proof_finish ( kpc->kat = NULL; if (TALER_EC_NONE != ec) { - kpc->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; + kpc->response_code = TALER_ErrorCode_get_http_status (ec); + GNUNET_assert (kpc->response_code != UINT_MAX); kpc->response = make_html_error ( kpc->rc->connection, "kyc-proof-internal-error", diff --git a/src/exchange/taler-exchange-httpd_kyc-upload.c b/src/exchange/taler-exchange-httpd_kyc-upload.c index fa62c1bcf..7bea4768f 100644 --- a/src/exchange/taler-exchange-httpd_kyc-upload.c +++ b/src/exchange/taler-exchange-httpd_kyc-upload.c @@ -349,7 +349,8 @@ aml_trigger_callback ( GNUNET_assert (NULL == uc->response); if (TALER_EC_NONE != ec) { - uc->response_code = MHD_HTTP_INTERNAL_SERVER_ERROR; + uc->response_code = TALER_ErrorCode_get_http_status (ec); + GNUNET_assert (uc->response_code != UINT_MAX); uc->response = TALER_MHD_make_error ( ec, detail); -- cgit v1.2.3