merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 345c41b73a203ea35b9c622dd2b5a719017a4a29
parent d127df4bb479c61f1acfec7d38ee9a84a1de5490
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 19 Jan 2018 02:24:00 +0100

improve human-readable error message (maybe addressing Florians #5258-12809 concern

Diffstat:
Msrc/backend/taler-merchant-httpd_tip-pickup.c | 6+++++-
1 file changed, 5 insertions(+), 1 deletion(-)

diff --git 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,