summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-08 00:50:16 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-08 00:50:16 +0100
commite42cf1a738aef2c2aee32997d157965b02e2fe0d (patch)
tree0332ba70640210f1e4119927e2e5b72005f57163 /src/lib
parent579938a29e1d1d4ada49ca4c1a8b0d18878974a9 (diff)
downloadmerchant-e42cf1a738aef2c2aee32997d157965b02e2fe0d.tar.gz
merchant-e42cf1a738aef2c2aee32997d157965b02e2fe0d.tar.bz2
merchant-e42cf1a738aef2c2aee32997d157965b02e2fe0d.zip
adjust error codes in merchant
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/merchant_api_common.c2
-rw-r--r--src/lib/merchant_api_get_config.c4
-rw-r--r--src/lib/merchant_api_get_instance.c2
-rw-r--r--src/lib/merchant_api_get_instances.c4
-rw-r--r--src/lib/merchant_api_get_orders.c4
-rw-r--r--src/lib/merchant_api_get_product.c2
-rw-r--r--src/lib/merchant_api_get_products.c4
-rw-r--r--src/lib/merchant_api_get_reserve.c8
-rw-r--r--src/lib/merchant_api_get_reserves.c8
-rw-r--r--src/lib/merchant_api_get_tips.c4
-rw-r--r--src/lib/merchant_api_get_transfers.c8
-rw-r--r--src/lib/merchant_api_lock_product.c2
-rw-r--r--src/lib/merchant_api_merchant_get_order.c20
-rw-r--r--src/lib/merchant_api_merchant_get_tip.c4
-rw-r--r--src/lib/merchant_api_patch_instance.c2
-rw-r--r--src/lib/merchant_api_patch_order_forget.c2
-rw-r--r--src/lib/merchant_api_patch_product.c2
-rw-r--r--src/lib/merchant_api_post_instances.c2
-rw-r--r--src/lib/merchant_api_post_order_abort.c4
-rw-r--r--src/lib/merchant_api_post_order_claim.c4
-rw-r--r--src/lib/merchant_api_post_order_paid.c2
-rw-r--r--src/lib/merchant_api_post_order_pay.c6
-rw-r--r--src/lib/merchant_api_post_order_refund.c4
-rw-r--r--src/lib/merchant_api_post_orders.c28
-rw-r--r--src/lib/merchant_api_post_products.c2
-rw-r--r--src/lib/merchant_api_post_reserves.c4
-rw-r--r--src/lib/merchant_api_post_transfers.c8
-rw-r--r--src/lib/merchant_api_tip_authorize.c2
-rw-r--r--src/lib/merchant_api_tip_pickup.c2
-rw-r--r--src/lib/merchant_api_tip_pickup2.c2
-rw-r--r--src/lib/merchant_api_wallet_get_order.c6
-rw-r--r--src/lib/merchant_api_wallet_get_tip.c2
-rw-r--r--src/lib/merchant_api_wallet_post_order_refund.c12
33 files changed, 86 insertions, 86 deletions
diff --git a/src/lib/merchant_api_common.c b/src/lib/merchant_api_common.c
index a06a6722..c2fbaa39 100644
--- a/src/lib/merchant_api_common.c
+++ b/src/lib/merchant_api_common.c
@@ -42,7 +42,7 @@ TALER_MERCHANT_parse_error_details_ (const json_t *response,
hr->http_status = http_status;
if (NULL == response)
{
- hr->ec = TALER_EC_INVALID_RESPONSE;
+ hr->ec = TALER_EC_GENERIC_INVALID_RESPONSE;
return;
}
hr->ec = TALER_JSON_get_error_code (response);
diff --git a/src/lib/merchant_api_get_config.c b/src/lib/merchant_api_get_config.c
index bbf19329..b27e386c 100644
--- a/src/lib/merchant_api_get_config.c
+++ b/src/lib/merchant_api_get_config.c
@@ -120,7 +120,7 @@ handle_config_finished (void *cls,
NULL, NULL))
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
else
{
@@ -135,7 +135,7 @@ handle_config_finished (void *cls,
&age))
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
else
{
diff --git a/src/lib/merchant_api_get_instance.c b/src/lib/merchant_api_get_instance.c
index ed208ba7..512d1b7c 100644
--- a/src/lib/merchant_api_get_instance.c
+++ b/src/lib/merchant_api_get_instance.c
@@ -191,7 +191,7 @@ handle_get_instance_finished (void *cls,
}
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
GNUNET_JSON_parse_free (spec);
break;
}
diff --git a/src/lib/merchant_api_get_instances.c b/src/lib/merchant_api_get_instances.c
index ba2e5608..be8b6e5b 100644
--- a/src/lib/merchant_api_get_instances.c
+++ b/src/lib/merchant_api_get_instances.c
@@ -183,7 +183,7 @@ handle_instances_finished (void *cls,
NULL, NULL))
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
else
{
@@ -199,7 +199,7 @@ handle_instances_finished (void *cls,
else
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
}
GNUNET_JSON_parse_free (spec);
diff --git a/src/lib/merchant_api_get_orders.c b/src/lib/merchant_api_get_orders.c
index d1f2843b..0b8a35f8 100644
--- a/src/lib/merchant_api_get_orders.c
+++ b/src/lib/merchant_api_get_orders.c
@@ -170,7 +170,7 @@ handle_get_orders_finished (void *cls,
NULL, NULL))
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
else
{
@@ -186,7 +186,7 @@ handle_get_orders_finished (void *cls,
else
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
}
GNUNET_JSON_parse_free (spec);
diff --git a/src/lib/merchant_api_get_product.c b/src/lib/merchant_api_get_product.c
index 02560761..c88e74f9 100644
--- a/src/lib/merchant_api_get_product.c
+++ b/src/lib/merchant_api_get_product.c
@@ -169,7 +169,7 @@ handle_get_product_finished (void *cls,
return;
}
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
GNUNET_JSON_parse_free (spec);
break;
}
diff --git a/src/lib/merchant_api_get_products.c b/src/lib/merchant_api_get_products.c
index 47d45009..d5d57252 100644
--- a/src/lib/merchant_api_get_products.c
+++ b/src/lib/merchant_api_get_products.c
@@ -158,7 +158,7 @@ handle_get_products_finished (void *cls,
NULL, NULL))
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
else
{
@@ -174,7 +174,7 @@ handle_get_products_finished (void *cls,
else
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
}
GNUNET_JSON_parse_free (spec);
diff --git a/src/lib/merchant_api_get_reserve.c b/src/lib/merchant_api_get_reserve.c
index bd88661f..429cccff 100644
--- a/src/lib/merchant_api_get_reserve.c
+++ b/src/lib/merchant_api_get_reserve.c
@@ -89,7 +89,7 @@ handle_reserve_get_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
{
@@ -120,7 +120,7 @@ handle_reserve_get_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
@@ -142,7 +142,7 @@ handle_reserve_get_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
{
@@ -184,7 +184,7 @@ handle_reserve_get_finished (void *cls,
GNUNET_break_op (0);
GNUNET_free (tds);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
rgh->cb (rgh->cb_cls,
diff --git a/src/lib/merchant_api_get_reserves.c b/src/lib/merchant_api_get_reserves.c
index 524f3b68..52853065 100644
--- a/src/lib/merchant_api_get_reserves.c
+++ b/src/lib/merchant_api_get_reserves.c
@@ -88,7 +88,7 @@ handle_reserves_get_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
{
@@ -106,7 +106,7 @@ handle_reserves_get_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
else
@@ -122,7 +122,7 @@ handle_reserves_get_finished (void *cls,
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
rds_length = json_array_size (reserves);
@@ -168,7 +168,7 @@ handle_reserves_get_finished (void *cls,
GNUNET_free (rds);
GNUNET_JSON_parse_free (spec);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
rgh->cb (rgh->cb_cls,
diff --git a/src/lib/merchant_api_get_tips.c b/src/lib/merchant_api_get_tips.c
index ada15952..16a87fff 100644
--- a/src/lib/merchant_api_get_tips.c
+++ b/src/lib/merchant_api_get_tips.c
@@ -162,7 +162,7 @@ handle_get_tips_finished (void *cls,
NULL, NULL))
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
else
{
@@ -178,7 +178,7 @@ handle_get_tips_finished (void *cls,
else
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
}
GNUNET_JSON_parse_free (spec);
diff --git a/src/lib/merchant_api_get_transfers.c b/src/lib/merchant_api_get_transfers.c
index 90dce5d5..0bfd9990 100644
--- a/src/lib/merchant_api_get_transfers.c
+++ b/src/lib/merchant_api_get_transfers.c
@@ -88,7 +88,7 @@ handle_transfers_get_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
{
@@ -106,7 +106,7 @@ handle_transfers_get_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
else
@@ -122,7 +122,7 @@ handle_transfers_get_finished (void *cls,
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
tds_length = json_array_size (transfers);
@@ -171,7 +171,7 @@ handle_transfers_get_finished (void *cls,
GNUNET_free (tds);
GNUNET_JSON_parse_free (spec);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
gth->cb (gth->cb_cls,
diff --git a/src/lib/merchant_api_lock_product.c b/src/lib/merchant_api_lock_product.c
index 906ca68c..27f4f6e5 100644
--- a/src/lib/merchant_api_lock_product.c
+++ b/src/lib/merchant_api_lock_product.c
@@ -98,7 +98,7 @@ handle_lock_product_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_NO_CONTENT:
break;
diff --git a/src/lib/merchant_api_merchant_get_order.c b/src/lib/merchant_api_merchant_get_order.c
index 62510a6c..9504d16b 100644
--- a/src/lib/merchant_api_merchant_get_order.c
+++ b/src/lib/merchant_api_merchant_get_order.c
@@ -87,7 +87,7 @@ handle_unpaid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
GNUNET_break_op (0);
hr->http_status = 0;
- hr->ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr->ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
hr,
NULL);
@@ -135,7 +135,7 @@ handle_claimed (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
GNUNET_break_op (0);
hr->http_status = 0;
- hr->ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr->ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
hr,
NULL);
@@ -201,7 +201,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
GNUNET_break_op (0);
hr->http_status = 0;
- hr->ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr->ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
hr,
NULL);
@@ -214,7 +214,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
GNUNET_break_op (0);
hr->http_status = 0;
- hr->ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr->ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
hr,
NULL);
@@ -257,7 +257,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
GNUNET_break_op (0);
hr->http_status = 0;
- hr->ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr->ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
hr,
NULL);
@@ -277,7 +277,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
GNUNET_JSON_spec_uint32 ("code",
&c32),
GNUNET_JSON_spec_string ("hint",
- &wr->hint),
+ &wr->hint),
GNUNET_JSON_spec_uint32 ("exchange_ec",
&eec32),
GNUNET_JSON_spec_uint32 ("exchange_hc",
@@ -294,7 +294,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
GNUNET_break_op (0);
hr->http_status = 0;
- hr->ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr->ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
hr,
NULL);
@@ -328,7 +328,7 @@ handle_paid (struct TALER_MERCHANT_OrderMerchantGetHandle *omgh,
{
GNUNET_break_op (0);
hr->http_status = 0;
- hr->ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr->ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
hr,
NULL);
@@ -407,7 +407,7 @@ handle_merchant_order_get_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
&hr,
NULL);
@@ -434,7 +434,7 @@ handle_merchant_order_get_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_MERCHANT_ORDER_GET_REPLY_MALFORMED;
+ hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED;
omgh->cb (omgh->cb_cls,
&hr,
NULL);
diff --git a/src/lib/merchant_api_merchant_get_tip.c b/src/lib/merchant_api_merchant_get_tip.c
index 09c9fb76..4d4c66f7 100644
--- a/src/lib/merchant_api_merchant_get_tip.c
+++ b/src/lib/merchant_api_merchant_get_tip.c
@@ -171,7 +171,7 @@ handle_merchant_tip_get_finished (void *cls,
NULL, NULL))
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
else
{
@@ -206,7 +206,7 @@ handle_merchant_tip_get_finished (void *cls,
else
{
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
}
GNUNET_JSON_parse_free (spec);
diff --git a/src/lib/merchant_api_patch_instance.c b/src/lib/merchant_api_patch_instance.c
index d63aef71..7e38b23b 100644
--- a/src/lib/merchant_api_patch_instance.c
+++ b/src/lib/merchant_api_patch_instance.c
@@ -98,7 +98,7 @@ handle_patch_instance_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_NO_CONTENT:
break;
diff --git a/src/lib/merchant_api_patch_order_forget.c b/src/lib/merchant_api_patch_order_forget.c
index 1a7a6c64..b00361fc 100644
--- a/src/lib/merchant_api_patch_order_forget.c
+++ b/src/lib/merchant_api_patch_order_forget.c
@@ -98,7 +98,7 @@ handle_forget_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
break;
diff --git a/src/lib/merchant_api_patch_product.c b/src/lib/merchant_api_patch_product.c
index 4d456c5a..e7d22520 100644
--- a/src/lib/merchant_api_patch_product.c
+++ b/src/lib/merchant_api_patch_product.c
@@ -98,7 +98,7 @@ handle_patch_product_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_NO_CONTENT:
break;
diff --git a/src/lib/merchant_api_post_instances.c b/src/lib/merchant_api_post_instances.c
index 7b19c25b..1d52f053 100644
--- a/src/lib/merchant_api_post_instances.c
+++ b/src/lib/merchant_api_post_instances.c
@@ -98,7 +98,7 @@ handle_post_instances_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_NO_CONTENT:
break;
diff --git a/src/lib/merchant_api_post_order_abort.c b/src/lib/merchant_api_post_order_abort.c
index d8489d84..4e8a508e 100644
--- a/src/lib/merchant_api_post_order_abort.c
+++ b/src/lib/merchant_api_post_order_abort.c
@@ -243,7 +243,7 @@ handle_abort_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
if (GNUNET_OK ==
@@ -254,7 +254,7 @@ handle_abort_finished (void *cls,
return;
}
hr.http_status = 0;
- hr.ec = TALER_EC_PAY_MERCHANT_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_BAD_REQUEST:
hr.ec = TALER_JSON_get_error_code (json);
diff --git a/src/lib/merchant_api_post_order_claim.c b/src/lib/merchant_api_post_order_claim.c
index ab7d26b8..80c4949a 100644
--- a/src/lib/merchant_api_post_order_claim.c
+++ b/src/lib/merchant_api_post_order_claim.c
@@ -127,7 +127,7 @@ handle_post_order_claim_finished (void *cls,
GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
"Claiming order failed: could not parse JSON response\n");
GNUNET_break_op (0);
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
hr.http_status = 0;
och->cb (och->cb_cls,
&hr,
@@ -143,7 +143,7 @@ handle_post_order_claim_finished (void *cls,
&hash))
{
GNUNET_break (0);
- hr.ec = TALER_EC_CLIENT_INTERNAL_FAILURE;
+ hr.ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_CLIENT_INTERNAL_FAILURE;
hr.http_status = 0;
GNUNET_JSON_parse_free (spec);
och->cb (och->cb_cls,
diff --git a/src/lib/merchant_api_post_order_paid.c b/src/lib/merchant_api_post_order_paid.c
index 5424ad8b..cdb4ae23 100644
--- a/src/lib/merchant_api_post_order_paid.c
+++ b/src/lib/merchant_api_post_order_paid.c
@@ -100,7 +100,7 @@ handle_paid_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_NO_CONTENT:
break;
diff --git a/src/lib/merchant_api_post_order_pay.c b/src/lib/merchant_api_post_order_pay.c
index 783b84f3..1088074c 100644
--- a/src/lib/merchant_api_post_order_pay.c
+++ b/src/lib/merchant_api_post_order_pay.c
@@ -258,7 +258,7 @@ handle_pay_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
if (oph->am_wallet)
@@ -281,7 +281,7 @@ handle_pay_finished (void *cls,
NULL, NULL))
{
GNUNET_break_op (0);
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
hr.http_status = 0;
hr.hint = "sig field missing in response";
break;
@@ -294,7 +294,7 @@ handle_pay_finished (void *cls,
&oph->merchant_pub.eddsa_pub))
{
GNUNET_break_op (0);
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
hr.http_status = 0;
hr.hint = "signature invalid";
}
diff --git a/src/lib/merchant_api_post_order_refund.c b/src/lib/merchant_api_post_order_refund.c
index c40fb7a7..748fb8c1 100644
--- a/src/lib/merchant_api_post_order_refund.c
+++ b/src/lib/merchant_api_post_order_refund.c
@@ -92,7 +92,7 @@ handle_refund_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
orh->cb (orh->cb_cls,
&hr,
NULL,
@@ -117,7 +117,7 @@ handle_refund_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
orh->cb (orh->cb_cls,
&hr,
NULL,
diff --git a/src/lib/merchant_api_post_orders.c b/src/lib/merchant_api_post_orders.c
index 9c45ad2c..56de86d1 100644
--- a/src/lib/merchant_api_post_orders.c
+++ b/src/lib/merchant_api_post_orders.c
@@ -92,12 +92,12 @@ handle_post_order_finished (void *cls,
.hr.reply = json
};
struct TALER_ClaimTokenP token = {0};
-
+
po->job = NULL;
switch (response_code)
{
case 0:
- por.hr.ec = TALER_EC_INVALID_RESPONSE;
+ por.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
{
@@ -109,7 +109,7 @@ handle_post_order_finished (void *cls,
&token)),
GNUNET_JSON_spec_end ()
};
-
+
if (GNUNET_OK !=
GNUNET_JSON_parse (json,
spec,
@@ -117,7 +117,7 @@ handle_post_order_finished (void *cls,
{
GNUNET_break_op (0);
por.hr.http_status = 0;
- por.hr.ec = TALER_EC_PROPOSAL_REPLY_MALFORMED;
+ por.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED;
}
else
{
@@ -157,21 +157,21 @@ handle_post_order_finished (void *cls,
struct GNUNET_JSON_Specification spec[] = {
GNUNET_JSON_spec_string (
- "product_id",
- &por.details.gone.product_id),
+ "product_id",
+ &por.details.gone.product_id),
GNUNET_JSON_spec_uint64 (
- "requested_quantity",
- &por.details.gone.requested_quantity),
+ "requested_quantity",
+ &por.details.gone.requested_quantity),
GNUNET_JSON_spec_uint64 (
- "available_quantity",
- &por.details.gone.available_quantity),
+ "available_quantity",
+ &por.details.gone.available_quantity),
GNUNET_JSON_spec_mark_optional (
GNUNET_JSON_spec_absolute_time (
- "restock_expected",
- &por.details.gone.restock_expected)),
+ "restock_expected",
+ &por.details.gone.restock_expected)),
GNUNET_JSON_spec_end ()
};
-
+
if (GNUNET_OK !=
GNUNET_JSON_parse (json,
spec,
@@ -179,7 +179,7 @@ handle_post_order_finished (void *cls,
{
GNUNET_break_op (0);
por.hr.http_status = 0;
- por.hr.ec = TALER_EC_PROPOSAL_REPLY_MALFORMED;
+ por.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED;
}
break;
}
diff --git a/src/lib/merchant_api_post_products.c b/src/lib/merchant_api_post_products.c
index 64360594..ed1d3899 100644
--- a/src/lib/merchant_api_post_products.c
+++ b/src/lib/merchant_api_post_products.c
@@ -98,7 +98,7 @@ handle_post_products_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_NO_CONTENT:
break;
diff --git a/src/lib/merchant_api_post_reserves.c b/src/lib/merchant_api_post_reserves.c
index 59ae0efe..149ecaeb 100644
--- a/src/lib/merchant_api_post_reserves.c
+++ b/src/lib/merchant_api_post_reserves.c
@@ -93,7 +93,7 @@ handle_post_reserves_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
{
@@ -114,7 +114,7 @@ handle_post_reserves_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
else
diff --git a/src/lib/merchant_api_post_transfers.c b/src/lib/merchant_api_post_transfers.c
index 5d35f6e8..14a44971 100644
--- a/src/lib/merchant_api_post_transfers.c
+++ b/src/lib/merchant_api_post_transfers.c
@@ -93,7 +93,7 @@ handle_post_transfers_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_OK:
{
@@ -120,7 +120,7 @@ handle_post_transfers_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
else
@@ -136,7 +136,7 @@ handle_post_transfers_finished (void *cls,
GNUNET_break_op (0);
GNUNET_JSON_parse_free (spec);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
deposit_sums_length = json_array_size (deposit_sums);
@@ -172,7 +172,7 @@ handle_post_transfers_finished (void *cls,
GNUNET_free (details);
GNUNET_JSON_parse_free (spec);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
pth->cb (pth->cb_cls,
diff --git a/src/lib/merchant_api_tip_authorize.c b/src/lib/merchant_api_tip_authorize.c
index 57f2e2c0..64aad420 100644
--- a/src/lib/merchant_api_tip_authorize.c
+++ b/src/lib/merchant_api_tip_authorize.c
@@ -159,7 +159,7 @@ handle_tip_authorize_finished (void *cls,
}
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
case MHD_HTTP_NOT_FOUND:
/* Well-defined status code, pass on to application! */
diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c
index 9cd5fb52..5f27b93b 100644
--- a/src/lib/merchant_api_tip_pickup.c
+++ b/src/lib/merchant_api_tip_pickup.c
@@ -151,7 +151,7 @@ pickup_done_cb (void *cls,
struct TALER_MERCHANT_HttpResponse hrx = {
.reply = hr->reply,
.http_status = 0,
- .ec = TALER_EC_TIP_PICKUP_UNBLIND_FAILURE
+ .ec = TALER_EC_MERCHANT_TIP_PICKUP_UNBLIND_FAILURE
};
tp->cb (tp->cb_cls,
diff --git a/src/lib/merchant_api_tip_pickup2.c b/src/lib/merchant_api_tip_pickup2.c
index 1f12b3fc..f32a6feb 100644
--- a/src/lib/merchant_api_tip_pickup2.c
+++ b/src/lib/merchant_api_tip_pickup2.c
@@ -179,7 +179,7 @@ handle_tip_pickup_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
}
break;
case MHD_HTTP_INTERNAL_SERVER_ERROR:
diff --git a/src/lib/merchant_api_wallet_get_order.c b/src/lib/merchant_api_wallet_get_order.c
index 1866fc66..5979e69f 100644
--- a/src/lib/merchant_api_wallet_get_order.c
+++ b/src/lib/merchant_api_wallet_get_order.c
@@ -79,7 +79,7 @@ cb_failure (struct TALER_MERCHANT_OrderWalletGetHandle *owgh,
const json_t *reply)
{
struct TALER_MERCHANT_HttpResponse hr = {
- .ec = TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ .ec = ec,
.reply = reply
};
@@ -138,7 +138,7 @@ handle_wallet_get_order_finished (void *cls,
{
GNUNET_break_op (0);
cb_failure (owgh,
- TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ TALER_EC_GENERIC_REPLY_MALFORMED,
json);
TALER_MERCHANT_wallet_order_get_cancel (owgh);
return;
@@ -166,7 +166,7 @@ handle_wallet_get_order_finished (void *cls,
{
GNUNET_break_op (0);
cb_failure (owgh,
- TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ TALER_EC_GENERIC_REPLY_MALFORMED,
json);
}
else
diff --git a/src/lib/merchant_api_wallet_get_tip.c b/src/lib/merchant_api_wallet_get_tip.c
index df454006..c6a6039d 100644
--- a/src/lib/merchant_api_wallet_get_tip.c
+++ b/src/lib/merchant_api_wallet_get_tip.c
@@ -112,7 +112,7 @@ handle_wallet_tip_get_finished (void *cls,
{
GNUNET_break_op (0);
hr.http_status = 0;
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
break;
}
tgh->cb (tgh->cb_cls,
diff --git a/src/lib/merchant_api_wallet_post_order_refund.c b/src/lib/merchant_api_wallet_post_order_refund.c
index ad56b6d3..c527696b 100644
--- a/src/lib/merchant_api_wallet_post_order_refund.c
+++ b/src/lib/merchant_api_wallet_post_order_refund.c
@@ -82,7 +82,7 @@ cb_failure (struct TALER_MERCHANT_WalletOrderRefundHandle *orh,
const json_t *reply)
{
struct TALER_MERCHANT_HttpResponse hr = {
- .ec = TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ .ec = ec,
.reply = reply
};
@@ -119,7 +119,7 @@ handle_refund_finished (void *cls,
switch (response_code)
{
case 0:
- hr.ec = TALER_EC_INVALID_RESPONSE;
+ hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE;
orh->cb (orh->cb_cls,
&hr,
NULL,
@@ -150,7 +150,7 @@ handle_refund_finished (void *cls,
{
GNUNET_break_op (0);
cb_failure (orh,
- TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ TALER_EC_GENERIC_REPLY_MALFORMED,
json);
TALER_MERCHANT_wallet_post_order_refund_cancel (orh);
return;
@@ -160,7 +160,7 @@ handle_refund_finished (void *cls,
{
GNUNET_break_op (0);
cb_failure (orh,
- TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ TALER_EC_GENERIC_REPLY_MALFORMED,
json);
GNUNET_JSON_parse_free (spec);
TALER_MERCHANT_wallet_post_order_refund_cancel (orh);
@@ -195,7 +195,7 @@ handle_refund_finished (void *cls,
{
GNUNET_break_op (0);
cb_failure (orh,
- TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ TALER_EC_GENERIC_REPLY_MALFORMED,
json);
TALER_MERCHANT_wallet_post_order_refund_cancel (orh);
return;
@@ -282,7 +282,7 @@ handle_refund_finished (void *cls,
{
GNUNET_break_op (0);
cb_failure (orh,
- TALER_EC_CHECK_PAYMENT_RESPONSE_MALFORMED,
+ TALER_EC_GENERIC_REPLY_MALFORMED,
json);
TALER_MERCHANT_wallet_post_order_refund_cancel (orh);
return;