diff options
Diffstat (limited to 'src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-del.c')
-rw-r--r-- | src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-del.c | 34 |
1 files changed, 14 insertions, 20 deletions
diff --git a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-del.c b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-del.c index 128b9a42a..80cebbee3 100644 --- a/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-del.c +++ b/src/auditor/taler-auditor-httpd_misattribution-in-inconsistency-del.c @@ -1,6 +1,3 @@ - - - /* This file is part of TALER Copyright (C) 2024 Taler Systems SA @@ -22,13 +19,14 @@ MHD_RESULT -TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_delete (struct TAH_RequestHandler *rh, - struct MHD_Connection * - connection, - void **connection_cls, - const char *upload_data, - size_t *upload_data_size, - const char *const args[]) +TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_delete (struct + TAH_RequestHandler *rh, + struct MHD_Connection * + connection, + void **connection_cls, + const char *upload_data, + size_t *upload_data_size, + const char *const args[]) { MHD_RESULT res; @@ -41,9 +39,8 @@ TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_delete (struct TAH_RequestHandler *r else return TALER_MHD_reply_with_error (connection, MHD_HTTP_BAD_REQUEST, - // TODO: not the correct ec - TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID, - "exchange signature invalid"); + TALER_EC_AUDITOR_URI_MISSING_PATH_COMPONENT, + "uri is missing a trailing path component"); if (GNUNET_SYSERR == TAH_plugin->preflight (TAH_plugin->cls)) @@ -58,9 +55,9 @@ TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_delete (struct TAH_RequestHandler *r // execute the transaction qs = TAH_plugin->delete_misattribution_in_inconsistency (TAH_plugin->cls, - row_id); + row_id); - if (0 == qs) + if (0 >= qs) { // goes in here if there was an error with the transaction GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR == qs); @@ -69,9 +66,8 @@ TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_delete (struct TAH_RequestHandler *r args[1]); return TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, - // TODO: not the correct ec - TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID, - "exchange signature invalid"); + TALER_EC_AUDITOR_RESOURCE_NOT_FOUND, + "the requested resource does not exist"); } @@ -83,5 +79,3 @@ TAH_MISATTRIBUTION_IN_INCONSISTENCY_handler_delete (struct TAH_RequestHandler *r return res; } - -
\ No newline at end of file |