[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: improve logging
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: improve logging |
Date: |
Thu, 24 Jun 2021 13:17:30 +0200 |
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 5d6ec4c7 improve logging
5d6ec4c7 is described below
commit 5d6ec4c7443e1a69766fa7cf507dbcfe096d52a8
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Thu Jun 24 13:17:28 2021 +0200
improve logging
---
src/exchange-tools/taler-auditor-offline.c | 6 ++++--
src/lib/exchange_api_auditor_add_denomination.c | 28 ++++++++++++++++++-------
2 files changed, 24 insertions(+), 10 deletions(-)
diff --git a/src/exchange-tools/taler-auditor-offline.c
b/src/exchange-tools/taler-auditor-offline.c
index 81e2bfeb..7b6d0a89 100644
--- a/src/exchange-tools/taler-auditor-offline.c
+++ b/src/exchange-tools/taler-auditor-offline.c
@@ -395,11 +395,13 @@ denomination_add_cb (
if (MHD_HTTP_NO_CONTENT != hr->http_status)
{
fprintf (stderr,
- "Upload failed for command %u with status %u: %s (%s)\n",
+ "Upload failed for command #%u with status %u: %s (%s)\n",
(unsigned int) dar->idx,
hr->http_status,
TALER_ErrorCode_get_hint (hr->ec),
- hr->hint);
+ NULL != hr->hint
+ ? hr->hint
+ : "no hint provided");
global_ret = 42;
}
GNUNET_CONTAINER_DLL_remove (dar_head,
diff --git a/src/lib/exchange_api_auditor_add_denomination.c
b/src/lib/exchange_api_auditor_add_denomination.c
index d8df605d..50bffd97 100644
--- a/src/lib/exchange_api_auditor_add_denomination.c
+++ b/src/lib/exchange_api_auditor_add_denomination.c
@@ -1,6 +1,6 @@
/*
This file is part of TALER
- Copyright (C) 2015-2020 Taler Systems SA
+ Copyright (C) 2015-2021 Taler Systems SA
TALER is free software; you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free Software
@@ -106,13 +106,25 @@ handle_auditor_add_denomination_finished (void *cls,
break;
default:
/* unexpected response code */
- GNUNET_break_op (0);
- hr.ec = TALER_JSON_get_error_code (json);
- hr.hint = TALER_JSON_get_error_hint (json);
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Unexpected response code %u/%d for exchange
auditor-add-denomination\n",
- (unsigned int) response_code,
- (int) hr.ec);
+ if (NULL != json)
+ {
+ hr.ec = TALER_JSON_get_error_code (json);
+ hr.hint = TALER_JSON_get_error_hint (json);
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Unexpected response code %u/%d for exchange
auditor-add-denomination at URL `%s'\n",
+ (unsigned int) response_code,
+ (int) hr.ec,
+ ah->url);
+ }
+ else
+ {
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
+ hr.hint = NULL;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Unexpected HTTP response code %u (no JSON returned) at URL
`%s'\n",
+ (unsigned int) response_code,
+ ah->url);
+ }
break;
}
if (NULL != ah->cb)
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: improve logging,
gnunet <=