gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-exchange] branch master updated: nicer error reporti


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: nicer error reporting
Date: Thu, 14 Dec 2017 13:37:01 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 0f5ef01  nicer error reporting
0f5ef01 is described below

commit 0f5ef01dd3ef623fb06d3cf9046a18ae818d2570
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Dec 14 13:36:59 2017 +0100

    nicer error reporting
---
 src/bank-lib/bank_api_history.c | 2 +-
 src/include/taler_error_codes.h | 7 +++++++
 src/wire/plugin_wire_test.c     | 7 ++++---
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/src/bank-lib/bank_api_history.c b/src/bank-lib/bank_api_history.c
index fdc1e2a..d02b24c 100644
--- a/src/bank-lib/bank_api_history.c
+++ b/src/bank-lib/bank_api_history.c
@@ -174,7 +174,7 @@ handle_history_finished (void *cls,
   switch (response_code)
   {
   case 0:
-    ec = TALER_EC_INTERNAL_INVARIANT_FAILURE;
+    ec = TALER_EC_BANK_HISTORY_HTTP_FAILURE;
     break;
   case MHD_HTTP_OK:
     if (GNUNET_OK !=
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index 24d738f..85350e8 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -1516,6 +1516,13 @@ enum TALER_ErrorCode
   TALER_EC_BANK_HISTORY_NOT_AUHTORIZED = 4151,
 
   /**
+   * The bank library had trouble obtaining a valid
+   * HTTP response.
+   * Returned with a status code of 0.
+   */
+  TALER_EC_BANK_HISTORY_HTTP_FAILURE = 4152,
+
+  /**
    * The bank could not find the wire transfer that was supposed to
    * be rejected.
    * Returned with a status code of MHD_HTTP_NOT_FOUND.
diff --git a/src/wire/plugin_wire_test.c b/src/wire/plugin_wire_test.c
index fa6ba3d..10efba2 100644
--- a/src/wire/plugin_wire_test.c
+++ b/src/wire/plugin_wire_test.c
@@ -891,9 +891,10 @@ bhist_cb (void *cls,
     GNUNET_free (whh);
     break;
   default:
-    /* FIXME: consider modifying API to pass more specific error code(s)
-       back to the application. */
-    GNUNET_break (0);
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Bank failed with HTTP status %u (EC: %u)\n",
+                http_status,
+                ec);
     if (NULL != whh->hres_cb)
       (void) whh->hres_cb (whh->hres_cb_cls,
                            ec,

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



reply via email to

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