diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-10-25 20:09:23 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-10-25 20:09:23 +0100 |
commit | 429456b3188d0b0828b557553107ddfa83e8aa81 (patch) | |
tree | d568c9901b0601cd55c3a9d90f32cbf2c99dfbc8 /src/backend | |
parent | 2771e50ebee0aba9d4bf701a580d099372627e0f (diff) | |
download | merchant-429456b3188d0b0828b557553107ddfa83e8aa81.tar.gz merchant-429456b3188d0b0828b557553107ddfa83e8aa81.tar.bz2 merchant-429456b3188d0b0828b557553107ddfa83e8aa81.zip |
use better status codes
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-instances.c | 2 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-orders.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c b/src/backend/taler-merchant-httpd_private-post-instances.c index f703506e..1a9d2b27 100644 --- a/src/backend/taler-merchant-httpd_private-post-instances.c +++ b/src/backend/taler-merchant-httpd_private-post-instances.c @@ -188,7 +188,7 @@ TMH_private_post_instances (const struct TMH_RequestHandler *rh, GNUNET_break_op (0); GNUNET_JSON_parse_free (spec); return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, + MHD_HTTP_CONFLICT, TALER_EC_POST_INSTANCES_BAD_CURRENCY, NULL); } diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c index 82e5e6c3..840cc076 100644 --- a/src/backend/taler-merchant-httpd_private-post-orders.c +++ b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -385,7 +385,7 @@ execute_order (struct MHD_Connection *connection, GNUNET_JSON_parse_free (spec); return TALER_MHD_reply_with_error ( connection, - MHD_HTTP_BAD_REQUEST, + MHD_HTTP_CONFLICT, TALER_EC_PROPOSAL_ORDER_BAD_CURRENCY, TMH_currency); } @@ -464,7 +464,7 @@ execute_order (struct MHD_Connection *connection, MHD_RESULT ret; ret = TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, /* or conflict? */ + MHD_HTTP_CONFLICT, TALER_EC_PROPOSAL_STORE_DB_ERROR_ALREADY_EXISTS, order_id); GNUNET_JSON_parse_free (spec); |