summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-10-25 19:49:57 +0100
committerChristian Grothoff <christian@grothoff.org>2020-10-25 19:49:57 +0100
commit2771e50ebee0aba9d4bf701a580d099372627e0f (patch)
treee65fa35a80988920a646b9783482baa6295be4a0
parentebaa7e6c4068b2299b2001858e28341f8fe1bb8d (diff)
downloadmerchant-2771e50ebee0aba9d4bf701a580d099372627e0f.tar.gz
merchant-2771e50ebee0aba9d4bf701a580d099372627e0f.tar.bz2
merchant-2771e50ebee0aba9d4bf701a580d099372627e0f.zip
fix logging of expected problems
-rw-r--r--src/backend/taler-merchant-httpd_private-patch-instances-ID.c2
-rw-r--r--src/backend/taler-merchant-httpd_private-post-instances.c2
-rw-r--r--src/lib/merchant_api_get_instance.c5
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
index 94ecca45..5cfc567c 100644
--- 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
index a839015d..f703506e 100644
--- 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
index 35250bf6..ed208ba7 100644
--- 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);