[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: -improve logging
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: -improve logging |
Date: |
Thu, 21 Jul 2022 15:38:33 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 18eb1956 -improve logging
18eb1956 is described below
commit 18eb19567bc6fff4d7d9ca165685192ef47bb6cc
Author: Christian Grothoff <grothoff@gnunet.org>
AuthorDate: Thu Jul 21 15:38:29 2022 +0200
-improve logging
---
src/backend/taler-merchant-httpd.c | 18 ++++++++++++++++++
src/backend/taler-merchant-httpd_private-post-orders.c | 3 +++
src/testing/test_merchant_instance_auth.sh | 2 +-
3 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd.c
b/src/backend/taler-merchant-httpd.c
index 43e945b2..edf9589c 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -1376,10 +1376,15 @@ url_handler (void *cls,
return ret;
}
if (NULL == hc->rh)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Endpoint `%s' not known\n",
+ hc->url);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_GENERIC_ENDPOINT_UNKNOWN,
hc->url);
+ }
}
}
/* At this point, we must have found a handler */
@@ -1389,6 +1394,9 @@ url_handler (void *cls,
if ( (NULL == hc->instance) &&
(! hc->rh->skip_instance) )
{
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Instance `%s' not known\n",
+ hc->infix);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN,
@@ -1462,18 +1470,28 @@ url_handler (void *cls,
if ( (NULL == hc->instance) &&
(! hc->rh->skip_instance) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Instance for URL `%s' not known\n",
+ url);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN,
url);
+ }
if ( (NULL != hc->instance) && /* make static analysis happy */
(! hc->rh->skip_instance) &&
(hc->instance->deleted) &&
(! hc->rh->allow_deleted_instance) )
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Instance `%s' was deleted\n",
+ hc->instance->settings.id);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_MERCHANT_GENERIC_INSTANCE_DELETED,
hc->instance->settings.id);
+ }
/* parse request body */
hc->has_body = ( (0 == strcasecmp (method,
MHD_HTTP_METHOD_POST)) ||
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c
b/src/backend/taler-merchant-httpd_private-post-orders.c
index 5444222b..bb64fb02 100644
--- a/src/backend/taler-merchant-httpd_private-post-orders.c
+++ b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -1351,6 +1351,9 @@ merge_inventory (struct MHD_Connection *connection,
ec = TALER_EC_GENERIC_DB_SOFT_FAILURE;
break;
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
+ GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
+ "Product %s from order unknown\n",
+ inventory_products[i].product_id);
http_status = MHD_HTTP_NOT_FOUND;
ec = TALER_EC_MERCHANT_GENERIC_PRODUCT_UNKNOWN;
break;
diff --git a/src/testing/test_merchant_instance_auth.sh
b/src/testing/test_merchant_instance_auth.sh
index 109f4eae..4ba4fc0e 100755
--- a/src/testing/test_merchant_instance_auth.sh
+++ b/src/testing/test_merchant_instance_auth.sh
@@ -20,7 +20,7 @@
. initialize_taler_system.sh
-echo -n "Configuring default instance ..."
+echo -n "Configuring 'default' instance ..."
STATUS=$(curl -H "Content-Type: application/json" -X POST \
http://localhost:9966/management/instances \
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: -improve logging,
gnunet <=