commit 2771e50ebee0aba9d4bf701a580d099372627e0f
parent ebaa7e6c4068b2299b2001858e28341f8fe1bb8d
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 25 Oct 2020 19:49:57 +0100
fix logging of expected problems
Diffstat:
3 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c
@@ -125,7 +125,7 @@ TMH_private_patch_instances_ID (const struct TMH_RequestHandler *rh,
(0 != strcasecmp (is.default_max_wire_fee.currency,
TMH_currency)))
{
- GNUNET_break (0);
+ GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c b/src/backend/taler-merchant-httpd_private-post-instances.c
@@ -185,7 +185,7 @@ TMH_private_post_instances (const struct TMH_RequestHandler *rh,
(0 != strcasecmp (is.default_max_wire_fee.currency,
TMH_currency)))
{
- GNUNET_break (0);
+ GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
diff --git a/src/lib/merchant_api_get_instance.c b/src/lib/merchant_api_get_instance.c
@@ -195,6 +195,11 @@ handle_get_instance_finished (void *cls,
GNUNET_JSON_parse_free (spec);
break;
}
+ case MHD_HTTP_NOT_FOUND:
+ /* instance does not exist */
+ 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);