aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2024-11-10 14:17:09 +0100
committerFlorian Dold <florian@dold.me>2024-11-10 14:17:09 +0100
commit0e68462e9040c2cbb536d0b0f797fa2e7aab064a (patch)
tree9269dfd1acdb6feb544a4eb97bbdf2fdcdee422e
parent14567679e56e37c725ca44553efb4bce441b82f5 (diff)
take HTTP status from EC
-rw-r--r--src/exchange/taler-exchange-httpd_kyc-proof.c3
-rw-r--r--src/exchange/taler-exchange-httpd_kyc-upload.c3
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);