summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-06-24 13:17:28 +0200
committerChristian Grothoff <christian@grothoff.org>2021-06-24 13:17:28 +0200
commit5d6ec4c7443e1a69766fa7cf507dbcfe096d52a8 (patch)
tree1b671609e9803a730e391b05efa0fa3057b37c1d /src/lib
parentf078421db8ccce3241b740ff7e74bc86ea248094 (diff)
downloadexchange-5d6ec4c7443e1a69766fa7cf507dbcfe096d52a8.tar.gz
exchange-5d6ec4c7443e1a69766fa7cf507dbcfe096d52a8.tar.bz2
exchange-5d6ec4c7443e1a69766fa7cf507dbcfe096d52a8.zip
improve logging
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/exchange_api_auditor_add_denomination.c28
1 files changed, 20 insertions, 8 deletions
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)