gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated (d127df4 -> 77cf038)


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated (d127df4 -> 77cf038)
Date: Fri, 19 Jan 2018 02:24:52 +0100

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

grothoff pushed a change to branch master
in repository merchant.

    from d127df4  include information about refund in /check-payment
     new 345c41b  improve human-readable error message (maybe addressing 
Florians #5258-12809 concern
     new 77cf038  do not complain given legal error code

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/backend/taler-merchant-httpd_tip-pickup.c | 6 +++++-
 src/lib/merchant_api_tip_pickup.c             | 3 +++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/backend/taler-merchant-httpd_tip-pickup.c 
b/src/backend/taler-merchant-httpd_tip-pickup.c
index 76bf7ce..5751747 100644
--- a/src/backend/taler-merchant-httpd_tip-pickup.c
+++ b/src/backend/taler-merchant-httpd_tip-pickup.c
@@ -203,23 +203,27 @@ run_pickup (struct MHD_Connection *connection,
   if (TALER_EC_NONE != ec)
   {
     unsigned int response_code;
+    const char *human;
 
     switch (ec)
     {
     case TALER_EC_TIP_PICKUP_TIP_ID_UNKNOWN:
       response_code = MHD_HTTP_NOT_FOUND;
+      human = "tip identifier not known to this service";
       break;
     case TALER_EC_TIP_PICKUP_NO_FUNDS:
       response_code = MHD_HTTP_SERVICE_UNAVAILABLE;
+      human = "withdrawn funds exceed amounts approved for tip";
       break;
     default:
       response_code = MHD_HTTP_INTERNAL_SERVER_ERROR;
+      human = "database failure";
       break;
     }
     return TMH_RESPONSE_reply_rc (connection,
                                  response_code,
                                  ec,
-                                 "Database error approving tip");
+                                 human);
   }
   sigs = json_array ();
   GNUNET_CRYPTO_eddsa_key_get_public (&reserve_priv.eddsa_priv,
diff --git a/src/lib/merchant_api_tip_pickup.c 
b/src/lib/merchant_api_tip_pickup.c
index cc84cea..5bcae49 100644
--- a/src/lib/merchant_api_tip_pickup.c
+++ b/src/lib/merchant_api_tip_pickup.c
@@ -179,6 +179,9 @@ handle_tip_pickup_finished (void *cls,
   case MHD_HTTP_SERVICE_UNAVAILABLE:
     /* legal, can happen if we pickup a tip twice... */
     break;
+  case MHD_HTTP_NOT_FOUND:
+    /* legal, can happen if tip ID is unknown */
+    break;
   default:
     /* unexpected response code */
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,

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



reply via email to

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