summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_withdraw2.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-12-20 20:03:59 +0100
committerChristian Grothoff <christian@grothoff.org>2020-12-20 20:03:59 +0100
commit4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993 (patch)
tree4780bcb1ed882dee315bd11ac1033ac333704654 /src/lib/exchange_api_withdraw2.c
parentd986555355de315121f1285c04ccc89082ba9755 (diff)
downloadexchange-4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993.tar.gz
exchange-4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993.tar.bz2
exchange-4b9fb610d81c47fbd8613cb71a4f25ce6b2d2993.zip
do not log error on MHD_HTTP_GONE status code, revocation is a legitimate reply
Diffstat (limited to 'src/lib/exchange_api_withdraw2.c')
-rw-r--r--src/lib/exchange_api_withdraw2.c36
1 files changed, 22 insertions, 14 deletions
diff --git a/src/lib/exchange_api_withdraw2.c b/src/lib/exchange_api_withdraw2.c
index 2b6b1a8fc..30439a599 100644
--- a/src/lib/exchange_api_withdraw2.c
+++ b/src/lib/exchange_api_withdraw2.c
@@ -275,6 +275,22 @@ handle_reserve_withdraw_finished (void *cls,
hr.ec = TALER_JSON_get_error_code (j);
hr.hint = TALER_JSON_get_error_hint (j);
break;
+ case MHD_HTTP_FORBIDDEN:
+ GNUNET_break_op (0);
+ /* Nothing really to verify, exchange says one of the signatures is
+ invalid; as we checked them, this should never happen, we
+ should pass the JSON reply to the application */
+ hr.ec = TALER_JSON_get_error_code (j);
+ hr.hint = TALER_JSON_get_error_hint (j);
+ break;
+ case MHD_HTTP_NOT_FOUND:
+ /* Nothing really to verify, the exchange basically just says
+ that it doesn't know this reserve. Can happen if we
+ query before the wire transfer went through.
+ We should simply pass the JSON reply to the application. */
+ hr.ec = TALER_JSON_get_error_code (j);
+ hr.hint = TALER_JSON_get_error_hint (j);
+ break;
case MHD_HTTP_CONFLICT:
/* The exchange says that the reserve has insufficient funds;
check the signatures in the history... */
@@ -292,19 +308,11 @@ handle_reserve_withdraw_finished (void *cls,
hr.hint = TALER_JSON_get_error_hint (j);
}
break;
- case MHD_HTTP_FORBIDDEN:
- GNUNET_break_op (0);
- /* Nothing really to verify, exchange says one of the signatures is
- invalid; as we checked them, this should never happen, we
- should pass the JSON reply to the application */
- hr.ec = TALER_JSON_get_error_code (j);
- hr.hint = TALER_JSON_get_error_hint (j);
- break;
- case MHD_HTTP_NOT_FOUND:
- /* Nothing really to verify, the exchange basically just says
- that it doesn't know this reserve. Can happen if we
- query before the wire transfer went through.
- We should simply pass the JSON reply to the application. */
+ case MHD_HTTP_GONE:
+ /* could happen if denomination was revoked */
+ /* Note: one might want to check /keys for revocation
+ signature here, alas tricky in case our /keys
+ is outdated => left to clients */
hr.ec = TALER_JSON_get_error_code (j);
hr.hint = TALER_JSON_get_error_hint (j);
break;
@@ -320,7 +328,7 @@ handle_reserve_withdraw_finished (void *cls,
hr.ec = TALER_JSON_get_error_code (j);
hr.hint = TALER_JSON_get_error_hint (j);
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "Unexpected response code %u/%d\n",
+ "Unexpected response code %u/%d for exchange withdraw\n",
(unsigned int) response_code,
(int) hr.ec);
break;