summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_parsing.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-11-07 14:39:15 +0100
committerChristian Grothoff <christian@grothoff.org>2016-11-07 14:39:15 +0100
commit1d740824fa8914e21c402abefc5f3d5a8cdfa4ca (patch)
tree74223d7b8931806183f5b5d8b09222c00d8a62c7 /src/exchange/taler-exchange-httpd_parsing.c
parent6d6a9dac39bd6c24a7d527186aaa2a1eec2d8c36 (diff)
parent247b8e33b3ea20407910929c78232ff0d44e8d9a (diff)
downloadexchange-1d740824fa8914e21c402abefc5f3d5a8cdfa4ca.tar.gz
exchange-1d740824fa8914e21c402abefc5f3d5a8cdfa4ca.tar.bz2
exchange-1d740824fa8914e21c402abefc5f3d5a8cdfa4ca.zip
resolving merge issue
Diffstat (limited to 'src/exchange/taler-exchange-httpd_parsing.c')
-rw-r--r--src/exchange/taler-exchange-httpd_parsing.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/exchange/taler-exchange-httpd_parsing.c b/src/exchange/taler-exchange-httpd_parsing.c
index c7118c462..e9c38eb82 100644
--- a/src/exchange/taler-exchange-httpd_parsing.c
+++ b/src/exchange/taler-exchange-httpd_parsing.c
@@ -79,6 +79,7 @@ TEH_PARSE_post_json (struct MHD_Connection *connection,
case GNUNET_JSON_PR_OUT_OF_MEMORY:
return (MHD_NO ==
TEH_RESPONSE_reply_internal_error (connection,
+ TALER_EC_PARSER_OUT_OF_MEMORY,
"out of memory"))
? GNUNET_SYSERR : GNUNET_NO;
case GNUNET_JSON_PR_CONTINUE:
@@ -144,7 +145,9 @@ TEH_PARSE_mhd_request_arg_data (struct MHD_Connection *connection,
if (NULL == str)
{
return (MHD_NO ==
- TEH_RESPONSE_reply_arg_missing (connection, param_name))
+ TEH_RESPONSE_reply_arg_missing (connection,
+ TALER_EC_PARAMETER_MISSING,
+ param_name))
? GNUNET_SYSERR : GNUNET_NO;
}
if (GNUNET_OK !=
@@ -153,7 +156,9 @@ TEH_PARSE_mhd_request_arg_data (struct MHD_Connection *connection,
out_data,
out_size))
return (MHD_NO ==
- TEH_RESPONSE_reply_arg_invalid (connection, param_name))
+ TEH_RESPONSE_reply_arg_invalid (connection,
+ TALER_EC_PARAMETER_MALFORMED,
+ param_name))
? GNUNET_SYSERR : GNUNET_NO;
return GNUNET_OK;
}
@@ -193,8 +198,9 @@ TEH_PARSE_json_data (struct MHD_Connection *connection,
ret = (MHD_YES ==
TEH_RESPONSE_reply_json_pack (connection,
MHD_HTTP_BAD_REQUEST,
- "{s:s, s:s, s:I}",
+ "{s:s, s:I, s:s, s:I}",
"error", "parse error",
+ "code", (json_int_t) TALER_EC_JSON_INVALID_WITH_DETAILS,
"field", error_json_name,
"line", (json_int_t) error_line))
? GNUNET_NO : GNUNET_SYSERR;