summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_deposit.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-25 15:11:56 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-25 15:11:56 +0200
commit4bba7263564303f45eed86cc68e54bbbf00856a6 (patch)
tree2a9985652bcf85670afc59559e129f639bd69578 /src/exchange/taler-exchange-httpd_deposit.c
parentce266ce8f2333d5c30672cf56c3d2e92ef20a851 (diff)
downloadexchange-4bba7263564303f45eed86cc68e54bbbf00856a6.tar.gz
exchange-4bba7263564303f45eed86cc68e54bbbf00856a6.tar.bz2
exchange-4bba7263564303f45eed86cc68e54bbbf00856a6.zip
nicer generic error reporting logic, for #6432
Diffstat (limited to 'src/exchange/taler-exchange-httpd_deposit.c')
-rw-r--r--src/exchange/taler-exchange-httpd_deposit.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c
index 0b810220..25c3d80c 100644
--- a/src/exchange/taler-exchange-httpd_deposit.c
+++ b/src/exchange/taler-exchange-httpd_deposit.c
@@ -161,7 +161,7 @@ deposit_precheck (void *cls,
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_DEPOSIT_HISTORY_DB_ERROR,
- "Could not check for existing identical deposit");
+ NULL);
return GNUNET_DB_STATUS_HARD_ERROR;
}
return qs;
@@ -255,7 +255,7 @@ deposit_transaction (void *cls,
connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_DEPOSIT_HISTORY_DB_ERROR,
- "could not fetch coin transaction history");
+ NULL);
return qs;
}
if (GNUNET_OK !=
@@ -269,7 +269,7 @@ deposit_transaction (void *cls,
connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_DEPOSIT_HISTORY_DB_ERROR,
- "could not calculate historic coin amount total");
+ NULL);
return GNUNET_DB_STATUS_HARD_ERROR;
}
/* Check that cost of all transactions (including the current one) is
@@ -301,7 +301,7 @@ deposit_transaction (void *cls,
*mhd_ret = TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
TALER_EC_DEPOSIT_STORE_DB_ERROR,
- "Could not persist /deposit data");
+ NULL);
}
return qs;
}
@@ -382,7 +382,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_DEPOSIT_REFUND_DEADLINE_AFTER_WIRE_DEADLINE,
- "refund_deadline");
+ NULL);
}
if (GNUNET_OK !=
TALER_JSON_merchant_wire_signature_hash (wire,
@@ -394,7 +394,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_DEPOSIT_INVALID_WIRE_FORMAT_JSON,
- "wire");
+ NULL);
}
if (0 != GNUNET_memcmp (&deposit.h_wire,
&my_h_wire))
@@ -404,7 +404,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_DEPOSIT_INVALID_WIRE_FORMAT_CONTRACT_HASH_CONFLICT,
- "h_wire");
+ NULL);
}
/* Check for idempotency: did we get this request before? */
@@ -457,7 +457,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
hc,
ec,
- "Could not find denomination key used in deposit");
+ NULL);
}
TALER_amount_ntoh (&deposit.deposit_fee,
&dki->issue.properties.fee_deposit);
@@ -471,7 +471,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_DEPOSIT_CURRENCY_MISMATCH,
- "contribution");
+ deposit.deposit_fee.currency);
}
/* check coin signature */
if (GNUNET_YES !=
@@ -484,7 +484,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_UNAUTHORIZED,
TALER_EC_DEPOSIT_DENOMINATION_SIGNATURE_INVALID,
- "ub_sig");
+ NULL);
}
TALER_amount_ntoh (&dc.value,
&dki->issue.properties.value);
@@ -498,7 +498,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
TALER_EC_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE,
- "deposited amount smaller than depositing fee");
+ NULL);
}
/* check deposit signature */
@@ -530,7 +530,7 @@ TEH_handler_deposit (struct MHD_Connection *connection,
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_UNAUTHORIZED,
TALER_EC_DEPOSIT_COIN_SIGNATURE_INVALID,
- "coin_sig");
+ NULL);
}
}