From 9628ac1ec778388e675727f889764c82c2711928 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 25 Oct 2020 20:15:20 +0100 Subject: handle more possible HTTP status codes nicely --- src/lib/merchant_api_delete_instance.c | 4 ++++ src/lib/merchant_api_post_orders.c | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'src') diff --git a/src/lib/merchant_api_delete_instance.c b/src/lib/merchant_api_delete_instance.c index 5c2bc51b..87b88e0c 100644 --- a/src/lib/merchant_api_delete_instance.c +++ b/src/lib/merchant_api_delete_instance.c @@ -91,6 +91,10 @@ handle_delete_instance_finished (void *cls, { case MHD_HTTP_NO_CONTENT: break; + case MHD_HTTP_NOT_FOUND: + hr.ec = TALER_JSON_get_error_code (json); + hr.hint = TALER_JSON_get_error_hint (json); + break; default: /* unexpected response code */ hr.ec = TALER_JSON_get_error_code (json); diff --git a/src/lib/merchant_api_post_orders.c b/src/lib/merchant_api_post_orders.c index 20af444f..aa29bea3 100644 --- a/src/lib/merchant_api_post_orders.c +++ b/src/lib/merchant_api_post_orders.c @@ -149,6 +149,11 @@ handle_post_order_finished (void *cls, hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); break; + case MHD_HTTP_CONFLICT: + /* Nothing really to verify */ + hr.ec = TALER_JSON_get_error_code (json); + hr.hint = TALER_JSON_get_error_hint (json); + break; case MHD_HTTP_INTERNAL_SERVER_ERROR: /* Server had an internal issue; we should retry, but this API leaves this to the application */ -- cgit v1.2.3