commit 200719526f65d5dab07e6dd58ea5555376b5f995
parent 8b13f276893aa41829fca0f190fac8524fa773d9
Author: Florian Dold <florian.dold@gmail.com>
Date: Mon, 23 May 2016 18:02:43 +0200
better error response
Diffstat:
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c
@@ -333,10 +333,13 @@ deposit_cb (void *cls,
if (NULL == proof)
{
- /* FIXME: is this the right code for when the exchange fails? */
+ /* We can't do anything meaningful here, the exchange did something wrong */
+ /* FIXME: any useful information we can include? */
resume_pay_with_response (pc,
- MHD_HTTP_INTERNAL_SERVER_ERROR,
- TMH_RESPONSE_make_internal_error ("Exchange failed, no proof available"));
+ MHD_HTTP_SERVICE_UNAVAILABLE,
+ TMH_RESPONSE_make_json_pack ("{s:s, s:s}",
+ "error", "exchange failed",
+ "hint", "The exchange provided an unexpected response"));
}
else
{