summaryrefslogtreecommitdiff
path: root/src/mhd
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-11-07 18:51:14 +0100
committerChristian Grothoff <christian@grothoff.org>2020-11-07 18:51:54 +0100
commit8d312562bf04eeb2afac53a2f24624f8e48529bd (patch)
treeff8ee7336406c4f8805ed9cee320acd105e77004 /src/mhd
parentdde5d38c4f895b53f4bd3423487573fc3e884351 (diff)
downloadexchange-8d312562bf04eeb2afac53a2f24624f8e48529bd.tar.gz
exchange-8d312562bf04eeb2afac53a2f24624f8e48529bd.tar.bz2
exchange-8d312562bf04eeb2afac53a2f24624f8e48529bd.zip
adjust ECs
Diffstat (limited to 'src/mhd')
-rw-r--r--src/mhd/mhd_parsing.c27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/mhd/mhd_parsing.c b/src/mhd/mhd_parsing.c
index a9f627491..d522f20f9 100644
--- a/src/mhd/mhd_parsing.c
+++ b/src/mhd/mhd_parsing.c
@@ -79,7 +79,7 @@ TALER_MHD_parse_post_json (struct MHD_Connection *connection,
TALER_MHD_reply_with_error (
connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_PARSER_OUT_OF_MEMORY,
+ TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY,
NULL)) ? GNUNET_SYSERR : GNUNET_NO;
case GNUNET_JSON_PR_CONTINUE:
@@ -95,7 +95,7 @@ TALER_MHD_parse_post_json (struct MHD_Connection *connection,
return (MHD_YES ==
TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- TALER_EC_JSON_INVALID,
+ TALER_EC_GENERIC_JSON_INVALID,
NULL))
? GNUNET_NO : GNUNET_SYSERR;
case GNUNET_JSON_PR_SUCCESS:
@@ -153,7 +153,7 @@ TALER_MHD_parse_request_arg_data (struct MHD_Connection *connection,
return (MHD_NO ==
TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- TALER_EC_PARAMETER_MISSING,
+ TALER_EC_GENERIC_PARAMETER_MISSING,
param_name))
? GNUNET_SYSERR : GNUNET_NO;
}
@@ -165,7 +165,7 @@ TALER_MHD_parse_request_arg_data (struct MHD_Connection *connection,
return (MHD_NO ==
TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- TALER_EC_PARAMETER_MALFORMED,
+ TALER_EC_GENERIC_PARAMETER_MALFORMED,
param_name))
? GNUNET_SYSERR : GNUNET_NO;
return GNUNET_OK;
@@ -208,9 +208,8 @@ TALER_MHD_parse_json_data (struct MHD_Connection *connection,
connection,
MHD_HTTP_BAD_REQUEST,
"{s:s, s:I, s:s, s:I}",
- "hint", TALER_ErrorCode_get_hint (
- TALER_EC_JSON_INVALID_WITH_DETAILS),
- "code", (json_int_t) TALER_EC_JSON_INVALID_WITH_DETAILS,
+ "hint", TALER_ErrorCode_get_hint (TALER_EC_GENERIC_JSON_INVALID),
+ "code", (json_int_t) TALER_EC_GENERIC_JSON_INVALID,
"field", error_json_name,
"line", (json_int_t) error_line))
? GNUNET_NO : GNUNET_SYSERR;
@@ -261,8 +260,8 @@ TALER_MHD_parse_internal_json_data (struct MHD_Connection *connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
"{s:s, s:I, s:s, s:I}",
"hint", TALER_ErrorCode_get_hint (
- TALER_EC_INTERNAL_INVARIANT_FAILURE),
- "code", (json_int_t) TALER_EC_INTERNAL_INVARIANT_FAILURE,
+ TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE),
+ "code", (json_int_t) TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE,
"field", error_json_name,
"line", (json_int_t) error_line))
? GNUNET_NO : GNUNET_SYSERR;
@@ -315,9 +314,8 @@ TALER_MHD_parse_json_array (struct MHD_Connection *connection,
connection,
MHD_HTTP_BAD_REQUEST,
"{s:s, s:I, s:s, s:I}",
- "hint", TALER_ErrorCode_get_hint (
- TALER_EC_JSON_INVALID_WITH_DETAILS),
- "code", (json_int_t) TALER_EC_JSON_INVALID_WITH_DETAILS,
+ "hint", TALER_ErrorCode_get_hint (TALER_EC_GENERIC_JSON_INVALID),
+ "code", (json_int_t) TALER_EC_GENERIC_JSON_INVALID,
"detail", "expected array",
"dimension", dim))
? GNUNET_NO : GNUNET_SYSERR;
@@ -337,9 +335,8 @@ TALER_MHD_parse_json_array (struct MHD_Connection *connection,
MHD_HTTP_BAD_REQUEST,
"{s:s, s:s, s:I, s:I}",
"detail", error_json_name,
- "hint", TALER_ErrorCode_get_hint (
- TALER_EC_JSON_INVALID_WITH_DETAILS),
- "code", (json_int_t) TALER_EC_JSON_INVALID_WITH_DETAILS,
+ "hint", TALER_ErrorCode_get_hint (TALER_EC_GENERIC_JSON_INVALID),
+ "code", (json_int_t) TALER_EC_GENERIC_JSON_INVALID,
"line", (json_int_t) error_line))
? GNUNET_NO : GNUNET_SYSERR;
return ret;