summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-10-25 20:15:20 +0100
committerChristian Grothoff <christian@grothoff.org>2020-10-25 20:16:10 +0100
commit9628ac1ec778388e675727f889764c82c2711928 (patch)
tree2735340f8c5a049d53a5aaf9c6648cbf11b61e83 /src/lib
parent429456b3188d0b0828b557553107ddfa83e8aa81 (diff)
downloadmerchant-9628ac1ec778388e675727f889764c82c2711928.tar.gz
merchant-9628ac1ec778388e675727f889764c82c2711928.tar.bz2
merchant-9628ac1ec778388e675727f889764c82c2711928.zip
handle more possible HTTP status codes nicely
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_delete_instance.c4
-rw-r--r--src/lib/merchant_api_post_orders.c5
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
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 */