diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-08-25 20:32:36 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-08-25 20:32:36 +0200 |
commit | d354d119db7ca0195cb93140bf3160b11449fa92 (patch) | |
tree | ae96671396a0073d4416cb59d57a7a54f87bd20b /src/backend/taler-merchant-httpd_private-post-products-ID-lock.c | |
parent | 0acefc910ff1b86aa04300310d63e3ea88d509de (diff) | |
download | merchant-d354d119db7ca0195cb93140bf3160b11449fa92.tar.gz merchant-d354d119db7ca0195cb93140bf3160b11449fa92.tar.bz2 merchant-d354d119db7ca0195cb93140bf3160b11449fa92.zip |
fix #6432
Diffstat (limited to 'src/backend/taler-merchant-httpd_private-post-products-ID-lock.c')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-products-ID-lock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c b/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c index d7f87c7f..5758362d 100644 --- a/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c +++ b/src/backend/taler-merchant-httpd_private-post-products-ID-lock.c @@ -82,8 +82,9 @@ TMH_private_post_products_ID_lock (const struct TMH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_PRODUCTS_PATCH_DB_COMMIT_HARD_ERROR, - "Failed to execute DB transaction to lock product"); + NULL); case GNUNET_DB_STATUS_SOFT_ERROR: + GNUNET_break (0); return TALER_MHD_reply_with_error (connection, MHD_HTTP_INTERNAL_SERVER_ERROR, TALER_EC_INTERNAL_INVARIANT_FAILURE, @@ -97,12 +98,12 @@ TMH_private_post_products_ID_lock (const struct TMH_RequestHandler *rh, return TALER_MHD_reply_with_error (connection, MHD_HTTP_NOT_FOUND, TALER_EC_PRODUCTS_LOCK_UNKNOWN_PRODUCT, - "The specified product is unknown"); + product_id); else return TALER_MHD_reply_with_error (connection, MHD_HTTP_GONE, TALER_EC_PRODUCTS_LOCK_INSUFFICIENT_STOCKS, - "The specified product is out of stock"); + product_id); case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT: return TALER_MHD_reply_static (connection, MHD_HTTP_NO_CONTENT, |