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: New error code for


From: gnunet
Subject: [GNUnet-SVN] [taler-exchange] branch master updated: New error code for a unknown reserve public key.
Date: Tue, 22 May 2018 12:43:02 +0200

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

marcello pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new b84ba70  New error code for a unknown reserve public key.
b84ba70 is described below

commit b84ba7074b1dfe92781690d75d338b65cd1e6902
Author: Marcello Stanisci <address@hidden>
AuthorDate: Tue May 22 12:42:02 2018 +0200

    New error code for a unknown reserve public key.
    
    Specific to the /reserve/status API.
---
 src/exchange/taler-exchange-httpd_reserve_status.c | 5 +++--
 src/include/taler_error_codes.h                    | 6 ++++++
 src/json/json.c                                    | 2 --
 3 files changed, 9 insertions(+), 4 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd_reserve_status.c 
b/src/exchange/taler-exchange-httpd_reserve_status.c
index 998460d..6ff73de 100644
--- a/src/exchange/taler-exchange-httpd_reserve_status.c
+++ b/src/exchange/taler-exchange-httpd_reserve_status.c
@@ -154,9 +154,10 @@ TEH_RESERVE_handler_reserve_status (struct 
TEH_RequestHandler *rh,
   if (NULL == rsc.rh)
     return TEH_RESPONSE_reply_json_pack (connection,
                                          MHD_HTTP_NOT_FOUND,
-                                         "{s:s, s:s}",
+                                         "{s:s, s:s, s:I}",
                                          "error", "Reserve not found",
-                                         "parameter", "withdraw_pub");
+                                         "parameter", "withdraw_pub",
+                                         "code", (json_int_t) 
TALER_EC_RESERVE_STATUS_UNKNOWN);
   mhd_ret = reply_reserve_status_success (connection,
                                          rsc.rh);
   TEH_plugin->free_reserve_history (TEH_plugin->cls,
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index 8f082ec..754681b 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -299,6 +299,12 @@ enum TALER_ErrorCode
    */
   TALER_EC_RESERVE_STATUS_DB_ERROR = 1150,
 
+  /**
+   * The reserve status was requested using a unknown key,
+   * to be returned with 404 Not Found.
+   */
+  TALER_EC_RESERVE_STATUS_UNKNOWN = 1151,
+
 
   /**
    * The respective coin did not have sufficient residual value
diff --git a/src/json/json.c b/src/json/json.c
index adcc231..700b58a 100644
--- a/src/json/json.c
+++ b/src/json/json.c
@@ -80,6 +80,4 @@ TALER_JSON_get_error_code (const json_t *json)
   return TALER_EC_INVALID;
 }
 
-
-
 /* End of json/json.c */

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



reply via email to

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