diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-11-08 00:50:16 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-11-08 00:50:16 +0100 |
commit | e42cf1a738aef2c2aee32997d157965b02e2fe0d (patch) | |
tree | 0332ba70640210f1e4119927e2e5b72005f57163 /src/backend/taler-merchant-httpd_post-orders-ID-paid.c | |
parent | 579938a29e1d1d4ada49ca4c1a8b0d18878974a9 (diff) | |
download | merchant-e42cf1a738aef2c2aee32997d157965b02e2fe0d.tar.gz merchant-e42cf1a738aef2c2aee32997d157965b02e2fe0d.tar.bz2 merchant-e42cf1a738aef2c2aee32997d157965b02e2fe0d.zip |
adjust error codes in merchant
Diffstat (limited to 'src/backend/taler-merchant-httpd_post-orders-ID-paid.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_post-orders-ID-paid.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-paid.c b/src/backend/taler-merchant-httpd_post-orders-ID-paid.c index effc4e12..1e692bfc 100644 --- a/src/backend/taler-merchant-httpd_post-orders-ID-paid.c +++ b/src/backend/taler-merchant-httpd_post-orders-ID-paid.c @@ -77,7 +77,7 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler *rh, GNUNET_break_op (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_FORBIDDEN, - TALER_EC_PAID_COIN_SIGNATURE_INVALID, + TALER_EC_MERCHANT_POST_ORDERS_ID_PAID_COIN_SIGNATURE_INVALID, NULL); } @@ -100,8 +100,8 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler *rh, GNUNET_break (GNUNET_DB_STATUS_HARD_ERROR == qs); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_PAID_DB_ERROR, - NULL); + TALER_EC_GENERIC_DB_FETCH_FAILED, + "contract terms"); } if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs) { @@ -110,7 +110,7 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler *rh, order_id); return TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, - TALER_EC_PAID_ORDER_UNKNOWN, + TALER_EC_MERCHANT_GENERIC_ORDER_UNKNOWN, order_id); } @@ -125,8 +125,8 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler *rh, json_decref (contract_terms); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_INTERNAL_LOGIC_ERROR, - "Could not hash contract terms"); + TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH, + NULL); } if (0 != GNUNET_memcmp (&pr.h_contract_terms, &h_contract_terms)) @@ -134,7 +134,7 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler *rh, json_decref (contract_terms); return TALER_MHD_reply_with_error (connection, MHD_HTTP_CONFLICT, - TALER_EC_PAID_CONTRACT_HASH_MISMATCH, + TALER_EC_MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH, NULL); } } @@ -147,7 +147,7 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler *rh, json_decref (contract_terms); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_PAID_DB_ERROR, + TALER_EC_GENERIC_DB_START_FAILED, NULL); } { @@ -179,8 +179,8 @@ TMH_post_orders_ID_paid (const struct TMH_RequestHandler *rh, json_decref (contract_terms); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, - TALER_EC_PAID_DB_ERROR, - NULL); + TALER_EC_GENERIC_DB_STORE_FAILED, + "mark contract paid"); } } if (NULL != session_id) |