commit ad36dff20edac284a957d70858481b5e5f940b85
parent a44a1216dfb8f7b26cd873a39d250e675383c417
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 28 Mar 2026 21:51:07 +0100
fix minor inconsistencies with spec
Diffstat:
6 files changed, 6 insertions(+), 41 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_delete-purses-PURSE_PUB.c b/src/exchange/taler-exchange-httpd_delete-purses-PURSE_PUB.c
@@ -100,15 +100,17 @@ TEH_handler_purses_delete (
}
if (! found)
{
- return TALER_MHD_reply_with_ec (
+ return TALER_MHD_reply_with_error (
connection,
+ MHD_HTTP_NOT_FOUND,
TALER_EC_EXCHANGE_GENERIC_PURSE_UNKNOWN,
NULL);
}
if (decided)
{
- return TALER_MHD_reply_with_ec (
+ return TALER_MHD_reply_with_error (
connection,
+ MHD_HTTP_CONFLICT,
TALER_EC_EXCHANGE_PURSE_DELETE_ALREADY_DECIDED,
NULL);
}
diff --git a/src/exchange/taler-exchange-httpd_post-kyc-wallet.c b/src/exchange/taler-exchange-httpd_post-kyc-wallet.c
@@ -333,4 +333,4 @@ TEH_handler_kyc_wallet (
}
-/* end of taler-exchange-httpd_kyc-wallet.c */
+/* end of taler-exchange-httpd_post-kyc-wallet.c */
diff --git a/src/lib/exchange_api_post-kyc-wallet.c b/src/lib/exchange_api_post-kyc-wallet.c
@@ -148,9 +148,6 @@ handle_kyc_wallet_finished (void *cls,
case MHD_HTTP_FORBIDDEN:
ks.hr.ec = TALER_JSON_get_error_code (j);
break;
- case MHD_HTTP_NOT_FOUND:
- ks.hr.ec = TALER_JSON_get_error_code (j);
- break;
case MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS:
{
struct GNUNET_JSON_Specification spec[] = {
diff --git a/src/lib/exchange_api_post-management-aml-officers.c b/src/lib/exchange_api_post-management-aml-officers.c
@@ -138,21 +138,6 @@ handle_post_aml_officer_finished (void *cls,
res.hr.ec = TALER_JSON_get_error_code (json);
res.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",
- pmaoh->url);
- if (NULL != json)
- {
- res.hr.ec = TALER_JSON_get_error_code (json);
- res.hr.hint = TALER_JSON_get_error_hint (json);
- }
- else
- {
- res.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
- res.hr.hint = TALER_ErrorCode_get_hint (res.hr.ec);
- }
- break;
case MHD_HTTP_CONFLICT:
res.hr.ec = TALER_JSON_get_error_code (json);
res.hr.hint = TALER_JSON_get_error_hint (json);
diff --git a/src/lib/exchange_api_post-management-auditors.c b/src/lib/exchange_api_post-management-auditors.c
@@ -128,21 +128,6 @@ handle_auditors_finished (void *cls,
res.hr.ec = TALER_JSON_get_error_code (json);
res.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",
- pmah->url);
- if (NULL != json)
- {
- res.hr.ec = TALER_JSON_get_error_code (json);
- res.hr.hint = TALER_JSON_get_error_hint (json);
- }
- else
- {
- res.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
- res.hr.hint = TALER_ErrorCode_get_hint (res.hr.ec);
- }
- break;
case MHD_HTTP_CONFLICT:
res.hr.ec = TALER_JSON_get_error_code (json);
res.hr.hint = TALER_JSON_get_error_hint (json);
diff --git a/src/lib/exchange_api_post-management-drain.c b/src/lib/exchange_api_post-management-drain.c
@@ -130,11 +130,7 @@ handle_drain_finished (void *cls,
res.hr.ec = TALER_JSON_get_error_code (json);
res.hr.hint = TALER_JSON_get_error_hint (json);
break;
- case MHD_HTTP_CONFLICT:
- res.hr.ec = TALER_JSON_get_error_code (json);
- res.hr.hint = TALER_JSON_get_error_hint (json);
- break;
- case MHD_HTTP_PRECONDITION_FAILED:
+ case MHD_HTTP_INTERNAL_SERVER_ERROR:
res.hr.ec = TALER_JSON_get_error_code (json);
res.hr.hint = TALER_JSON_get_error_hint (json);
break;