From 64667c6f86b9a52957453bf173ff9dc866529240 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Thu, 7 Jan 2021 20:58:21 +0100 Subject: fix #6677 --- src/backend/taler-merchant-httpd_post-orders-ID-pay.c | 2 +- src/backend/taler-merchant-httpd_post-tips-ID-pickup.c | 2 +- src/lib/merchant_api_post_order_abort.c | 14 +++++++------- src/lib/merchant_api_post_order_pay.c | 14 +++++++------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c index 1767eb2a..7e7ac0b0 100644 --- a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c +++ b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c @@ -826,7 +826,7 @@ process_pay_with_exchange (void *cls, /* Forcing failed or we already did it, give up */ resume_pay_with_response ( pc, - MHD_HTTP_FAILED_DEPENDENCY, + MHD_HTTP_BAD_REQUEST, TALER_MHD_make_json_pack ( "{s:s, s:I, s:o, s:o?}", "hint", diff --git a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c index 29b8f13e..f6a3ef4a 100644 --- a/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c +++ b/src/backend/taler-merchant-httpd_post-tips-ID-pickup.c @@ -288,7 +288,7 @@ withdraw_cb (void *cls, if (NULL == blind_sig) { stop_operations (pc); - pc->http_status = MHD_HTTP_FAILED_DEPENDENCY; + pc->http_status = MHD_HTTP_BAD_GATEWAY; pc->response = TALER_MHD_make_json_pack ( "{s:I, s:I, s:I, s:O}", diff --git a/src/lib/merchant_api_post_order_abort.c b/src/lib/merchant_api_post_order_abort.c index 4e8a508e..f8cdaab4 100644 --- a/src/lib/merchant_api_post_order_abort.c +++ b/src/lib/merchant_api_post_order_abort.c @@ -287,19 +287,19 @@ handle_abort_finished (void *cls, hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); break; - case MHD_HTTP_FAILED_DEPENDENCY: - TALER_MERCHANT_parse_error_details_ (json, - response_code, - &hr); - /* Nothing really to verify, the merchant is blaming the exchange. - We should pass the JSON reply to the application */ - break; case MHD_HTTP_INTERNAL_SERVER_ERROR: hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); /* Server had an internal issue; we should retry, but this API leaves this to the application */ break; + case MHD_HTTP_BAD_GATEWAY: + TALER_MERCHANT_parse_error_details_ (json, + response_code, + &hr); + /* Nothing really to verify, the merchant is blaming the exchange. + We should pass the JSON reply to the application */ + break; default: /* unexpected response code */ TALER_MERCHANT_parse_error_details_ (json, diff --git a/src/lib/merchant_api_post_order_pay.c b/src/lib/merchant_api_post_order_pay.c index 1088074c..28e9f6ed 100644 --- a/src/lib/merchant_api_post_order_pay.c +++ b/src/lib/merchant_api_post_order_pay.c @@ -367,19 +367,19 @@ handle_pay_finished (void *cls, denomination key of a coin involved has expired. Might be a disagreement in timestamps? Still, pass on to application. */ break; - case MHD_HTTP_FAILED_DEPENDENCY: - TALER_MERCHANT_parse_error_details_ (json, - response_code, - &hr); - /* Nothing really to verify, the merchant is blaming the exchange. - We should pass the JSON reply to the application */ - break; case MHD_HTTP_INTERNAL_SERVER_ERROR: hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); /* Server had an internal issue; we should retry, but this API leaves this to the application */ break; + case MHD_HTTP_BAD_GATEWAY: + /* Nothing really to verify, the merchant is blaming the exchange. + We should pass the JSON reply to the application */ + TALER_MERCHANT_parse_error_details_ (json, + response_code, + &hr); + break; case MHD_HTTP_SERVICE_UNAVAILABLE: TALER_MERCHANT_parse_error_details_ (json, response_code, -- cgit v1.2.3