From 4bba7263564303f45eed86cc68e54bbbf00856a6 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 25 Aug 2020 15:11:56 +0200 Subject: nicer generic error reporting logic, for #6432 --- src/auditor/taler-auditor-httpd_deposit-confirmation.c | 12 ++++++------ src/auditor/taler-auditor-httpd_exchanges.c | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'src/auditor') diff --git a/src/auditor/taler-auditor-httpd_deposit-confirmation.c b/src/auditor/taler-auditor-httpd_deposit-confirmation.c index e60e5c02e..7ee5ead43 100644 --- a/src/auditor/taler-auditor-httpd_deposit-confirmation.c +++ b/src/auditor/taler-auditor-httpd_deposit-confirmation.c @@ -86,7 +86,7 @@ verify_and_execute_deposit_confirmation ( return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, TALER_EC_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID, - "master_sig (expired)"); + "master signature expired"); } /* check our cache */ @@ -105,7 +105,7 @@ verify_and_execute_deposit_confirmation ( return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_DB_SETUP_FAILED, - "failed to establish session with database"); + NULL); } if (! cached) { @@ -120,7 +120,7 @@ verify_and_execute_deposit_confirmation ( return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, TALER_EC_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID, - "master_sig"); + "master signature invalid"); } /* execute transaction */ @@ -134,7 +134,7 @@ verify_and_execute_deposit_confirmation ( return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_AUDITOR_EXCHANGE_STORE_DB_ERROR, - "failed to persist exchange signing key"); + NULL); } /* Cache it, due to concurreny it might already be in the cache, @@ -174,7 +174,7 @@ verify_and_execute_deposit_confirmation ( return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, TALER_EC_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID, - "exchange_sig"); + "exchange signature invalid"); } } @@ -189,7 +189,7 @@ verify_and_execute_deposit_confirmation ( return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_DEPOSIT_CONFIRMATION_STORE_DB_ERROR, - "failed to persist deposit-confirmation data"); + NULL); } return TALER_MHD_reply_json_pack (connection, MHD_HTTP_OK, diff --git a/src/auditor/taler-auditor-httpd_exchanges.c b/src/auditor/taler-auditor-httpd_exchanges.c index f117b6083..ffa215ec2 100644 --- a/src/auditor/taler-auditor-httpd_exchanges.c +++ b/src/auditor/taler-auditor-httpd_exchanges.c @@ -90,7 +90,7 @@ TAH_EXCHANGES_handler (struct TAH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_DB_SETUP_FAILED, - "failed to establish session with database"); + NULL); } ja = json_array (); GNUNET_break (NULL != ja); @@ -106,7 +106,7 @@ TAH_EXCHANGES_handler (struct TAH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_LIST_EXCHANGES_DB_ERROR, - "Could not fetch exchange list from database"); + NULL); } return TALER_MHD_reply_json_pack (connection, MHD_HTTP_OK, -- cgit v1.2.3