diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/exchange_api_management_auditor_enable.c | 15 | ||||
-rw-r--r-- | src/lib/exchange_api_management_get_keys.c | 15 | ||||
-rw-r--r-- | src/lib/exchange_api_management_post_extensions.c | 17 | ||||
-rw-r--r-- | src/lib/exchange_api_management_set_global_fee.c | 15 | ||||
-rw-r--r-- | src/lib/exchange_api_management_set_wire_fee.c | 15 | ||||
-rw-r--r-- | src/lib/exchange_api_management_update_aml_officer.c | 15 | ||||
-rw-r--r-- | src/lib/exchange_api_management_wire_disable.c | 17 | ||||
-rw-r--r-- | src/lib/exchange_api_management_wire_enable.c | 15 | ||||
-rw-r--r-- | src/lib/exchange_api_reserves_history.c | 1 |
9 files changed, 119 insertions, 6 deletions
diff --git a/src/lib/exchange_api_management_auditor_enable.c b/src/lib/exchange_api_management_auditor_enable.c index 65018577c..41c5049c2 100644 --- a/src/lib/exchange_api_management_auditor_enable.c +++ b/src/lib/exchange_api_management_auditor_enable.c @@ -96,6 +96,21 @@ handle_auditor_enable_finished (void *cls, aer.hr.ec = TALER_JSON_get_error_code (json); aer.hr.hint = TALER_JSON_get_error_hint (json); break; + case MHD_HTTP_NOT_FOUND: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + ah->url); + if (NULL != json) + { + aer.hr.ec = TALER_JSON_get_error_code (json); + aer.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + aer.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + aer.hr.hint = TALER_ErrorCode_get_hint (aer.hr.ec); + } + break; case MHD_HTTP_CONFLICT: aer.hr.ec = TALER_JSON_get_error_code (json); aer.hr.hint = TALER_JSON_get_error_hint (json); diff --git a/src/lib/exchange_api_management_get_keys.c b/src/lib/exchange_api_management_get_keys.c index df14f2e70..03339c663 100644 --- a/src/lib/exchange_api_management_get_keys.c +++ b/src/lib/exchange_api_management_get_keys.c @@ -327,6 +327,21 @@ handle_get_keys_finished (void *cls, response_code = 0; } break; + case MHD_HTTP_NOT_FOUND: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + gh->url); + if (NULL != json) + { + gkr.hr.ec = TALER_JSON_get_error_code (json); + gkr.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + gkr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + gkr.hr.hint = TALER_ErrorCode_get_hint (gkr.hr.ec); + } + break; default: /* unexpected response code */ if (NULL != json) diff --git a/src/lib/exchange_api_management_post_extensions.c b/src/lib/exchange_api_management_post_extensions.c index 99d1653d0..00d1c5e3f 100644 --- a/src/lib/exchange_api_management_post_extensions.c +++ b/src/lib/exchange_api_management_post_extensions.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2015-2021 Taler Systems SA + Copyright (C) 2015-2023 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 @@ -98,8 +98,19 @@ handle_post_extensions_finished (void *cls, per.hr.hint = TALER_JSON_get_error_hint (json); break; case MHD_HTTP_NOT_FOUND: - per.hr.ec = TALER_JSON_get_error_code (json); - per.hr.hint = TALER_JSON_get_error_hint (json); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + ph->url); + if (NULL != json) + { + per.hr.ec = TALER_JSON_get_error_code (json); + per.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + per.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + per.hr.hint = TALER_ErrorCode_get_hint (per.hr.ec); + } break; default: /* unexpected response code */ diff --git a/src/lib/exchange_api_management_set_global_fee.c b/src/lib/exchange_api_management_set_global_fee.c index 518e710cd..54c37fd64 100644 --- a/src/lib/exchange_api_management_set_global_fee.c +++ b/src/lib/exchange_api_management_set_global_fee.c @@ -93,6 +93,21 @@ handle_set_global_fee_finished (void *cls, sfr.hr.ec = TALER_JSON_get_error_code (json); sfr.hr.hint = TALER_JSON_get_error_hint (json); break; + case MHD_HTTP_NOT_FOUND: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + sgfh->url); + if (NULL != json) + { + sfr.hr.ec = TALER_JSON_get_error_code (json); + sfr.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + sfr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + sfr.hr.hint = TALER_ErrorCode_get_hint (sfr.hr.ec); + } + break; case MHD_HTTP_CONFLICT: sfr.hr.ec = TALER_JSON_get_error_code (json); sfr.hr.hint = TALER_JSON_get_error_hint (json); diff --git a/src/lib/exchange_api_management_set_wire_fee.c b/src/lib/exchange_api_management_set_wire_fee.c index 01ed7742b..03cab8c99 100644 --- a/src/lib/exchange_api_management_set_wire_fee.c +++ b/src/lib/exchange_api_management_set_wire_fee.c @@ -93,6 +93,21 @@ handle_set_wire_fee_finished (void *cls, swr.hr.ec = TALER_JSON_get_error_code (json); swr.hr.hint = TALER_JSON_get_error_hint (json); break; + case MHD_HTTP_NOT_FOUND: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + swfh->url); + if (NULL != json) + { + swr.hr.ec = TALER_JSON_get_error_code (json); + swr.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + swr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + swr.hr.hint = TALER_ErrorCode_get_hint (swr.hr.ec); + } + break; case MHD_HTTP_CONFLICT: swr.hr.ec = TALER_JSON_get_error_code (json); swr.hr.hint = TALER_JSON_get_error_hint (json); diff --git a/src/lib/exchange_api_management_update_aml_officer.c b/src/lib/exchange_api_management_update_aml_officer.c index 0033a1308..76cbc7e8d 100644 --- a/src/lib/exchange_api_management_update_aml_officer.c +++ b/src/lib/exchange_api_management_update_aml_officer.c @@ -98,6 +98,21 @@ handle_update_aml_officer_finished (void *cls, uar.hr.ec = TALER_JSON_get_error_code (json); uar.hr.hint = TALER_JSON_get_error_hint (json); break; + case MHD_HTTP_NOT_FOUND: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + wh->url); + if (NULL != json) + { + uar.hr.ec = TALER_JSON_get_error_code (json); + uar.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + uar.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + uar.hr.hint = TALER_ErrorCode_get_hint (uar.hr.ec); + } + break; case MHD_HTTP_CONFLICT: uar.hr.ec = TALER_JSON_get_error_code (json); uar.hr.hint = TALER_JSON_get_error_hint (json); diff --git a/src/lib/exchange_api_management_wire_disable.c b/src/lib/exchange_api_management_wire_disable.c index 30a010762..30749b0e4 100644 --- a/src/lib/exchange_api_management_wire_disable.c +++ b/src/lib/exchange_api_management_wire_disable.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2015-2021 Taler Systems SA + Copyright (C) 2015-2023 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 @@ -99,8 +99,19 @@ handle_auditor_disable_finished (void *cls, wdr.hr.hint = TALER_JSON_get_error_hint (json); break; case MHD_HTTP_NOT_FOUND: - wdr.hr.ec = TALER_JSON_get_error_code (json); - wdr.hr.hint = TALER_JSON_get_error_hint (json); + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + wh->url); + if (NULL != json) + { + wdr.hr.ec = TALER_JSON_get_error_code (json); + wdr.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + wdr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + wdr.hr.hint = TALER_ErrorCode_get_hint (wdr.hr.ec); + } break; case MHD_HTTP_CONFLICT: wdr.hr.ec = TALER_JSON_get_error_code (json); diff --git a/src/lib/exchange_api_management_wire_enable.c b/src/lib/exchange_api_management_wire_enable.c index 23a98b153..5add3e0b0 100644 --- a/src/lib/exchange_api_management_wire_enable.c +++ b/src/lib/exchange_api_management_wire_enable.c @@ -98,6 +98,21 @@ handle_auditor_enable_finished (void *cls, wer.hr.ec = TALER_JSON_get_error_code (json); wer.hr.hint = TALER_JSON_get_error_hint (json); break; + case MHD_HTTP_NOT_FOUND: + GNUNET_log (GNUNET_ERROR_TYPE_ERROR, + "Server did not find handler at `%s'. Did you configure the correct exchange base URL?\n", + wh->url); + if (NULL != json) + { + wer.hr.ec = TALER_JSON_get_error_code (json); + wer.hr.hint = TALER_JSON_get_error_hint (json); + } + else + { + wer.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; + wer.hr.hint = TALER_ErrorCode_get_hint (wer.hr.ec); + } + break; case MHD_HTTP_CONFLICT: wer.hr.ec = TALER_JSON_get_error_code (json); wer.hr.hint = TALER_JSON_get_error_hint (json); diff --git a/src/lib/exchange_api_reserves_history.c b/src/lib/exchange_api_reserves_history.c index af9ba49d2..7b8eb95e6 100644 --- a/src/lib/exchange_api_reserves_history.c +++ b/src/lib/exchange_api_reserves_history.c @@ -1110,6 +1110,7 @@ TALER_EXCHANGE_reserves_history ( if (NULL == job_headers) { GNUNET_break (0); + curl_easy_cleanup (eh); return NULL; } } |