summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_post-orders-ID-refund.c')
-rw-r--r--src/backend/taler-merchant-httpd_post-orders-ID-refund.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
index 7fafdd5e..18fca9ac 100644
--- a/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
+++ b/src/backend/taler-merchant-httpd_post-orders-ID-refund.c
@@ -508,6 +508,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
{
json_t *contract_terms;
uint64_t order_serial;
+
qs = TMH_db->lookup_contract_terms (TMH_db->cls,
hc->instance->settings.id,
hc->infix,
@@ -523,7 +524,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GET_ORDERS_DB_FETCH_CONTRACT_TERMS_ERROR,
- "db error fetching contract terms");
+ NULL);
}
if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
@@ -531,7 +532,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_NOT_FOUND,
TALER_EC_GET_ORDERS_ORDER_NOT_FOUND,
- "Did not find contract terms for order in DB");
+ NULL);
}
{
struct GNUNET_HashCode h_contract_terms;
@@ -544,7 +545,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GET_ORDERS_FAILED_COMPUTE_PROPOSAL_HASH,
- "Failed to hash contract terms");
+ NULL);
}
json_decref (contract_terms);
if (0 != GNUNET_memcmp (&h_contract_terms,
@@ -552,8 +553,8 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
{
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_FORBIDDEN,
- TALER_EC_GET_ORDERS_FAILED_COMPUTE_PROPOSAL_HASH,
- "");
+ TALER_EC_GET_ORDER_WRONG_CONTRACT,
+ NULL);
}
}
}
@@ -572,7 +573,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GET_ORDERS_DB_LOOKUP_ERROR,
- "Failed to lookup refunds for contract");
+ NULL);
}
}
@@ -595,7 +596,7 @@ TMH_post_orders_ID_refund (const struct TMH_RequestHandler *rh,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_GET_ORDERS_DB_LOOKUP_ERROR,
- "Merchant database error");
+ NULL);
case GNUNET_DB_STATUS_SUCCESS_NO_RESULTS:
/* We need to talk to the exchange */
/* Notify clients waiting for the refund to be obtained. */