diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-httpd_proposal.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c index 1cdea4a6..6d934c98 100644 --- a/src/backend/taler-merchant-httpd_proposal.c +++ b/src/backend/taler-merchant-httpd_proposal.c @@ -436,15 +436,20 @@ proposal_put (struct MHD_Connection *connection, } if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS != qs) { - if ( (GNUNET_DB_STATUS_SOFT_ERROR == qs) || - (GNUNET_DB_STATUS_HARD_ERROR == qs) ) + if (GNUNET_DB_STATUS_HARD_ERROR == qs) { return TMH_RESPONSE_reply_internal_error (connection, - TALER_EC_PROPOSAL_STORE_DB_ERROR, - "db error: could not check for existing order"); + TALER_EC_PROPOSAL_STORE_DB_ERROR_HARD, + "db error: could not check for existing order due to hard transaction failure"); + } + if (GNUNET_DB_STATUS_SOFT_ERROR == qs) + { + return TMH_RESPONSE_reply_internal_error (connection, + TALER_EC_PROPOSAL_STORE_DB_ERROR_SOFT, + "db error: could not check for existing order due to soft transaction failure (FIXME: should implement retry logic)"); } return TMH_RESPONSE_reply_external_error (connection, - TALER_EC_PROPOSAL_STORE_DB_ERROR, + TALER_EC_PROPOSAL_STORE_DB_ERROR_ALREADY_EXISTS, "proposal already exists"); } |