commit 9628ac1ec778388e675727f889764c82c2711928
parent 429456b3188d0b0828b557553107ddfa83e8aa81
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 25 Oct 2020 20:15:20 +0100
handle more possible HTTP status codes nicely
Diffstat:
2 files changed, 9 insertions(+), 0 deletions(-)
diff --git 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
@@ -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 */