gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] 02/04: also log error code on unexpected f


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] 02/04: also log error code on unexpected failure
Date: Tue, 16 Jan 2018 13:14:17 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

commit 55cd81c3d60aaaeeca8eae3825a5f91be1a81a16
Author: Christian Grothoff <address@hidden>
AuthorDate: Tue Jan 16 11:41:26 2018 +0100

    also log error code on unexpected failure
---
 src/lib/test_merchant_api.c | 37 ++++++++++++++++++++++++-------------
 1 file changed, 24 insertions(+), 13 deletions(-)

diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index 7ca10d8..48ee882 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -1384,8 +1384,9 @@ reserve_status_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     GNUNET_break (0);
     json_dumpf (json, stderr, 0);
@@ -1508,8 +1509,9 @@ reserve_withdraw_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;
@@ -1608,8 +1610,9 @@ proposal_cb (void *cls,
   default: {
     char *s = json_dumps (obj, JSON_COMPACT);
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected status code from /proposal: %u. Step %u, response: 
%s\n",
+                "Unexpected status code from /proposal: %u (%d). Step %u, 
response: %s\n",
                 http_status,
+                ec,
                 is->ip,
                 s);
     GNUNET_free_non_null (s);
@@ -1842,8 +1845,9 @@ pay_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;
@@ -1909,8 +1913,9 @@ pay_again_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;
@@ -2029,8 +2034,9 @@ track_transfer_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;
@@ -2094,8 +2100,9 @@ track_transaction_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;
@@ -2132,8 +2139,9 @@ tip_authorize_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;
@@ -2141,8 +2149,9 @@ tip_authorize_cb (void *cls,
   if (cmd->details.tip_authorize.expected_ec != ec)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected error code %u to command %s\n",
+                "Unexpected error code %d (%u) to command %s\n",
                 ec,
+                http_status,
                 cmd->label);
     fail (is);
     return;
@@ -2199,7 +2208,7 @@ pickup_withdraw_cb (void *cls,
        (TALER_EC_NONE != ec) )
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%u to command %s when 
withdrawing\n",
+                "Unexpected response code %u (%d) to command %s when 
withdrawing\n",
                 http_status,
                 ec,
                 cmd->label);
@@ -2248,7 +2257,7 @@ pickup_cb (void *cls,
   if (http_status != cmd->expected_response_code)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u/%u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
                 ec,
                 cmd->label);
@@ -2752,8 +2761,9 @@ pay_refund_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;
@@ -2801,8 +2811,9 @@ abort_refund_cb (void *cls,
   if (cmd->expected_response_code != http_status)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Unexpected response code %u to command %s\n",
+                "Unexpected response code %u (%d) to command %s\n",
                 http_status,
+                ec,
                 cmd->label);
     fail (is);
     return;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]