From 566408fa02acf56bbf6063c6d17d739e491e27f2 Mon Sep 17 00:00:00 2001 From: Jonathan Buchanan Date: Thu, 18 Jun 2020 20:27:04 -0400 Subject: stricter tests for tips/reserves --- src/backend/taler-merchant-httpd.c | 2 +- .../taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) (limited to 'src/backend') diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index 34c31647..3968d6b2 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -865,7 +865,7 @@ url_handler (void *cls, }, /* POST /reserves/$ID/authorize-tip: */ { - .url_prefix = "/reserves", + .url_prefix = "/reserves/", .url_suffix = "authorize-tip", .have_id_segment = true, .method = MHD_HTTP_METHOD_POST, diff --git a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c index 61e2b38a..1c28173b 100644 --- a/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c +++ b/src/backend/taler-merchant-httpd_private-post-reserves-ID-authorize-tip.c @@ -97,6 +97,10 @@ authorize_tip (const struct TMH_RequestHandler *rh, msg = "Failed to approve tip: merchant's tipping reserve does not exist"; rc = MHD_HTTP_SERVICE_UNAVAILABLE; break; + case TALER_EC_TIP_AUTHORIZE_DB_RESERVE_NOT_FOUND: + msg = "Failed to approve tip: merchant's tipping reserve does not exist"; + rc = MHD_HTTP_NOT_FOUND; + break; default: rc = MHD_HTTP_INTERNAL_SERVER_ERROR; msg = "Failed to approve tip: internal server error"; -- cgit v1.2.3