summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_responses.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r--src/exchange/taler-exchange-httpd_responses.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c
index 048a8bef0..f051cd2e5 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -27,6 +27,7 @@
#include "taler-exchange-httpd_responses.h"
#include "taler_util.h"
#include "taler_json_lib.h"
+#include "taler_mhd_lib.h"
#include "taler-exchange-httpd_keystate.h"
/**
@@ -874,15 +875,16 @@ TEH_RESPONSE_reply_coin_insufficient_funds (struct MHD_Connection *connection,
history = TEH_RESPONSE_compile_transaction_history (tl);
if (NULL == history)
- return TEH_RESPONSE_reply_internal_error (connection,
- TALER_EC_COIN_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS,
- "failed to convert transaction history to JSON");
- return TEH_RESPONSE_reply_json_pack (connection,
- MHD_HTTP_FORBIDDEN,
- "{s:s, s:I, s:o}",
- "error", "insufficient funds",
- "code", (json_int_t) ec,
- "history", history);
+ return TALER_MHD_reply_with_error (connection,
+ MHD_HTTP_INTERNAL_SERVER_ERROR,
+ TALER_EC_COIN_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS,
+ "failed to convert transaction history to JSON");
+ return TALER_MHD_reply_json_pack (connection,
+ MHD_HTTP_FORBIDDEN,
+ "{s:s, s:I, s:o}",
+ "error", "insufficient funds",
+ "code", (json_int_t) ec,
+ "history", history);
}