summaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_deposit.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_deposit.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_deposit.c')
-rw-r--r--src/lib/exchange_api_deposit.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/lib/exchange_api_deposit.c b/src/lib/exchange_api_deposit.c
index 7bb083efe..a3fb8667a 100644
--- a/src/lib/exchange_api_deposit.c
+++ b/src/lib/exchange_api_deposit.c
@@ -361,6 +361,19 @@ handle_deposit_finished (void *cls,
hr.ec = TALER_JSON_get_error_code (j);
hr.hint = TALER_JSON_get_error_hint (j);
break;
+ case MHD_HTTP_FORBIDDEN:
+ hr.ec = TALER_JSON_get_error_code (j);
+ hr.hint = TALER_JSON_get_error_hint (j);
+ /* 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 */
+ break;
+ case MHD_HTTP_NOT_FOUND:
+ hr.ec = TALER_JSON_get_error_code (j);
+ hr.hint = TALER_JSON_get_error_hint (j);
+ /* Nothing really to verify, this should never
+ happen, we should pass the JSON reply to the application */
+ break;
case MHD_HTTP_CONFLICT:
/* Double spending; check signatures on transaction history */
if (GNUNET_OK !=
@@ -377,18 +390,13 @@ handle_deposit_finished (void *cls,
hr.hint = TALER_JSON_get_error_hint (j);
}
break;
- case MHD_HTTP_FORBIDDEN:
+ 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);
- /* 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 */
- break;
- case MHD_HTTP_NOT_FOUND:
- hr.ec = TALER_JSON_get_error_code (j);
- hr.hint = TALER_JSON_get_error_hint (j);
- /* Nothing really to verify, this should never
- happen, we should pass the JSON reply to the application */
break;
case MHD_HTTP_INTERNAL_SERVER_ERROR:
hr.ec = TALER_JSON_get_error_code (j);
@@ -401,7 +409,7 @@ handle_deposit_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 deposit\n",
(unsigned int) response_code,
hr.ec);
GNUNET_break_op (0);