summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_post-orders-ID-claim.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_post-orders-ID-claim.c')
-rw-r--r--src/backend/taler-merchant-httpd_post-orders-ID-claim.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-claim.c b/src/backend/taler-merchant-httpd_post-orders-ID-claim.c
index 1fee6596..d63766cd 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-claim.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-claim.c
@@ -230,24 +230,24 @@ TMH_post_orders_ID_claim (const struct TMH_RequestHandler *rh,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_ORDERS_CLAIM_HARD_DB_ERROR,
- "Failed to run DB transaction to claim order");
+ NULL);
case GNUNET_DB_STATUS_SOFT_ERROR:
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_ORDERS_CLAIM_SOFT_DB_ERROR,
- "Failed to serialize DB transaction to claim order");
+ NULL);
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
if (NULL == contract_terms)
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_ORDERS_CLAIM_NOT_FOUND,
- "unknown order id (or invalid claim token)");
+ order_id);
/* already claimed! */
json_decref (contract_terms);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_CONFLICT,
TALER_EC_ORDERS_ALREADY_CLAIMED,
- "order already claimed");
+ order_id);
case GNUNET_DB_STATUS_SUCCESS_ONE_RESULT:
GNUNET_assert (NULL != contract_terms);
break; /* Good! return signature (below) */
@@ -269,20 +269,18 @@ TMH_post_orders_ID_claim (const struct TMH_RequestHandler *rh,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_INTERNAL_LOGIC_ERROR,
- "Could not hash order");
+ NULL);
}
GNUNET_CRYPTO_eddsa_sign (&hc->instance->merchant_priv.eddsa_priv,
&pdps,
&merchant_sig);
- return TALER_MHD_reply_json_pack (connection,
- MHD_HTTP_OK,
- "{ s:o, s:o }",
- "contract_terms",
- contract_terms,
- "sig",
- GNUNET_JSON_from_data_auto (
- &merchant_sig));
+ return TALER_MHD_reply_json_pack (
+ connection,
+ MHD_HTTP_OK,
+ "{ s:o, s:o }",
+ "contract_terms", contract_terms,
+ "sig", GNUNET_JSON_from_data_auto (&merchant_sig));
}
}