summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-04-12 20:46:33 +0200
committerChristian Grothoff <christian@grothoff.org>2020-04-12 20:46:33 +0200
commitb93fba2cc1fca4cb1d0bfd1954b324c99e8ec23a (patch)
tree1e81c7f7256e910d34901b87a9b530207bf28193
parent9e3371ae9b67a154f1c03f7003a10aa75f0e9470 (diff)
downloadexchange-b93fba2cc1fca4cb1d0bfd1954b324c99e8ec23a.tar.gz
exchange-b93fba2cc1fca4cb1d0bfd1954b324c99e8ec23a.tar.bz2
exchange-b93fba2cc1fca4cb1d0bfd1954b324c99e8ec23a.zip
API updates and new error codes for merchant implementation of #6173
-rw-r--r--src/include/taler_error_codes.h34
-rw-r--r--src/lib/exchange_api_withdraw.c2
2 files changed, 27 insertions, 9 deletions
diff --git a/src/include/taler_error_codes.h b/src/include/taler_error_codes.h
index 2134e68d..10ad555a 100644
--- a/src/include/taler_error_codes.h
+++ b/src/include/taler_error_codes.h
@@ -1793,6 +1793,12 @@ enum TALER_ErrorCode
TALER_EC_TIP_QUERY_INSTANCE_DOES_NOT_TIP = 2719,
/**
+ * The tip id is unknown. This could happen if the tip id is wrong or
+ * the tip authorization expired.
+ */
+ TALER_EC_TIP_QUERY_TIP_ID_UNKNOWN = 2720,
+
+ /**
* The backend had trouble accessing the database to persist
* information about enabling tips. Returned with an HTTP status code
* of internal error.
@@ -1834,14 +1840,14 @@ enum TALER_ErrorCode
/**
* We failed to contact the exchange to obtain the denomination keys.
- * Returned with a response code "failed dependency" (424).
+ * Returned with a response code #MHD_HTTP_FAILED_DEPENDENCY.
*/
TALER_EC_TIP_PICKUP_EXCHANGE_DOWN = 2805,
/**
* We contacted the exchange to obtain any denomination keys, but got
- * no valid keys. Returned with a response code "failed dependency"
- * (424).
+ * no valid keys. Returned with a response code
+ * #MHD_HTTP_FAILED_DEPENDENCY.
*/
TALER_EC_TIP_PICKUP_EXCHANGE_LACKED_KEYS = 2806,
@@ -1854,21 +1860,33 @@ enum TALER_ErrorCode
/**
* We encountered an arithmetic issue totaling up the amount to
- * withdraw. Returned with a response code of "bad request".
+ * withdraw. Returned with a response code of #MHD_HTTP_BAD_REQUEST.
*/
TALER_EC_TIP_PICKUP_EXCHANGE_AMOUNT_OVERFLOW = 2808,
/**
* The number of planchets specified exceeded the limit. Returned with
- * a response code of "bad request".
+ * a response code of #MHD_HTTP_BAD_REQUEST.
*/
TALER_EC_TIP_PICKUP_EXCHANGE_TOO_MANY_PLANCHETS = 2809,
/**
- * The tip id is unknown. This could happen if the tip id is wrong or
- * the tip authorization expired.
+ * The merchant failed to initialize the withdraw operaiton. Returned
+ * with a response code of #MHD_HTTP_INTERNAL_SERVER_ERROR.
+ */
+ TALER_EC_TIP_PICKUP_WITHDRAW_FAILED = 2810,
+
+ /**
+ * The merchant failed to initialize the withdraw operaiton. Returned
+ * with a response code of #MHD_HTTP_FAILED_DEPENDENCY.
+ */
+ TALER_EC_TIP_PICKUP_WITHDRAW_FAILED_AT_EXCHANGE = 2811,
+
+ /**
+ * The client failed to unblind the signature returned by the
+ * merchant. Generated client-side.
*/
- TALER_EC_TIP_QUERY_TIP_ID_UNKNOWN = 2810,
+ TALER_EC_TIP_PICKUP_UNBLIND_FAILURE = 2812,
/**
* We failed to contract terms from our merchant database. The
diff --git a/src/lib/exchange_api_withdraw.c b/src/lib/exchange_api_withdraw.c
index 6b20fb84..88b0b1f6 100644
--- a/src/lib/exchange_api_withdraw.c
+++ b/src/lib/exchange_api_withdraw.c
@@ -175,7 +175,7 @@ TALER_EXCHANGE_withdraw (
&wh->c_hash,
&pd))
{
- GNUNET_break_op (0);
+ GNUNET_break (0);
GNUNET_free (wh);
return NULL;
}