[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-anastasis] 03/06: fixed taler error codes
From: |
gnunet |
Subject: |
[taler-anastasis] 03/06: fixed taler error codes |
Date: |
Sat, 29 Aug 2020 14:03:04 +0200 |
This is an automated email from the git hooks/post-receive script.
dennis-neufeld pushed a commit to branch master
in repository anastasis.
commit d40d08dbad7cde6f0df58031ca0be592b78f89ac
Author: Dennis Neufeld <dennis.neufeld@students.bfh.ch>
AuthorDate: Sat Aug 29 11:16:40 2020 +0200
fixed taler error codes
---
src/backend/anastasis-httpd_policy.c | 10 +++++-----
src/backend/anastasis-httpd_policy_upload.c | 9 ++++++---
src/backend/anastasis-httpd_truth_upload.c | 2 +-
3 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/src/backend/anastasis-httpd_policy.c
b/src/backend/anastasis-httpd_policy.c
index 2717783..cc853a4 100644
--- a/src/backend/anastasis-httpd_policy.c
+++ b/src/backend/anastasis-httpd_policy.c
@@ -118,19 +118,19 @@ AH_return_policy (struct MHD_Connection *connection,
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_HARD_FETCH_ERROR,
"hard database failure");
case ANASTASIS_DB_STATUS_SOFT_ERROR:
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_SOFT_FETCH_ERROR,
"soft database failure");
case ANASTASIS_DB_STATUS_NO_RESULTS:
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+
TALER_EC_SYNC_DB_INCONSISTENT_FETCH_ERROR,
"unexpected empty result set (try
again?)");
case ANASTASIS_DB_STATUS_SUCCESS_ONE_RESULT:
/* interesting case below */
@@ -234,13 +234,13 @@ AH_policy_get (struct MHD_Connection *connection,
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_HARD_FETCH_ERROR,
"hard database failure");
case ANASTASIS_DB_STATUS_SOFT_ERROR:
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+ TALER_EC_SYNC_DB_SOFT_FETCH_ERROR,
"soft database failure");
case ANASTASIS_DB_STATUS_NO_RESULTS:
{
diff --git a/src/backend/anastasis-httpd_policy_upload.c
b/src/backend/anastasis-httpd_policy_upload.c
index 6ac6158..e12506a 100644
--- a/src/backend/anastasis-httpd_policy_upload.c
+++ b/src/backend/anastasis-httpd_policy_upload.c
@@ -725,8 +725,11 @@ AH_handler_policy_post (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_BAD_REQUEST,
- // FIXME: ANASTASIS error c
- TALER_EC_SYNC_BAD_CONTENT_LENGTH,
+ (NULL == lens)
+ ?
+ TALER_EC_SYNC_MISSING_CONTENT_LENGTH
+ :
+
TALER_EC_SYNC_MALFORMED_CONTENT_LENGTH,
(NULL == lens)
? "Content-length value missing"
: "Content-length value malformed");
@@ -736,7 +739,7 @@ AH_handler_policy_post (struct MHD_Connection *connection,
GNUNET_break_op (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_PAYLOAD_TOO_LARGE,
- TALER_EC_SYNC_BAD_CONTENT_LENGTH,
+
TALER_EC_SYNC_MALFORMED_CONTENT_LENGTH,
"Content-length value not
acceptable");
}
puc->upload = GNUNET_malloc_large (len);
diff --git a/src/backend/anastasis-httpd_truth_upload.c
b/src/backend/anastasis-httpd_truth_upload.c
index 645e4e0..41f5366 100644
--- a/src/backend/anastasis-httpd_truth_upload.c
+++ b/src/backend/anastasis-httpd_truth_upload.c
@@ -158,7 +158,7 @@ AH_handler_truth_post (struct MHD_Connection *connection,
GNUNET_break (0);
return TALER_MHD_reply_with_error (connection,
MHD_HTTP_INTERNAL_SERVER_ERROR,
- TALER_EC_SYNC_DB_FETCH_ERROR,
+
TALER_EC_SYNC_DB_INCONSISTENT_FETCH_ERROR,
"database failure");
}
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-anastasis] branch master updated (658dc77 -> 57b4438), gnunet, 2020/08/29
- [taler-anastasis] 02/06: fix payment secret issue, gnunet, 2020/08/29
- [taler-anastasis] 01/06: fix conditional jump on unintiaksed value, gnunet, 2020/08/29
- [taler-anastasis] 03/06: fixed taler error codes,
gnunet <=
- [taler-anastasis] 06/06: fix test config file to work with 'make check', gnunet, 2020/08/29
- [taler-anastasis] 04/06: config file for anastasis-httpd and merchant-httpd to test cli, gnunet, 2020/08/29
- [taler-anastasis] 05/06: fix variable, gnunet, 2020/08/29