exchange

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

commit 0e68462e9040c2cbb536d0b0f797fa2e7aab064a
parent 14567679e56e37c725ca44553efb4bce441b82f5
Author: Florian Dold <florian@dold.me>
Date:   Sun, 10 Nov 2024 14:17:09 +0100

take HTTP status from EC

Diffstat:
Msrc/exchange/taler-exchange-httpd_kyc-proof.c | 3++-
Msrc/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 @@ -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 @@ -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);