LCOV - code coverage report
Current view: top level - util - taler_error_codes.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 26 29 89.7 %
Date: 2025-06-05 21:03:14 Functions: 3 3 100.0 %

          Line data    Source code
       1             : /*
       2             :      This file is part of GNU Taler
       3             :      Copyright (C) 2012-2020 Taler Systems SA
       4             : 
       5             :      GNU Taler is free software: you can redistribute it and/or modify it
       6             :      under the terms of the GNU Lesser General Public License as published
       7             :      by the Free Software Foundation, either version 3 of the License,
       8             :      or (at your option) any later version.
       9             : 
      10             :      GNU Taler is distributed in the hope that it will be useful, but
      11             :      WITHOUT ANY WARRANTY; without even the implied warranty of
      12             :      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      13             :      Lesser General Public License for more details.
      14             : 
      15             :      You should have received a copy of the GNU Lesser General Public License
      16             :      along with this program.  If not, see <http://www.gnu.org/licenses/>.
      17             : 
      18             :      SPDX-License-Identifier: LGPL3.0-or-later
      19             : 
      20             :      Note: the LGPL does not apply to all components of GNU Taler,
      21             :      but it does apply to this file.
      22             :  */
      23             : #include "taler_error_codes.h"
      24             : #include <stddef.h>
      25             : #include <microhttpd.h>
      26             : #include <gettext.h>
      27             : 
      28             : /**
      29             :  * MHD does not define our value for 0 (client-side generated code).
      30             :  */
      31             : #define MHD_HTTP_UNINITIALIZED 0
      32             : 
      33             : /**
      34             :  * A pair containing an error code and its hint.
      35             :  */
      36             : struct ErrorCodeAndHint
      37             : {
      38             :   /**
      39             :    * The error code.
      40             :    */
      41             :   enum TALER_ErrorCode ec;
      42             : 
      43             :   /**
      44             :    * The hint.
      45             :    */
      46             :   const char *hint;
      47             : 
      48             :   /**
      49             :    * The HTTP status code.
      50             :    */
      51             :   unsigned int http_code;
      52             : };
      53             : 
      54             : 
      55             : /**
      56             :  * The list of all error codes with their hints.
      57             :  */
      58             : static const struct ErrorCodeAndHint code_hint_pairs[] = {
      59             : 
      60             :   {
      61             :     .ec = TALER_EC_NONE,
      62             :     .hint = gettext_noop ("Special code to indicate success (no error)."),
      63             :     .http_code = MHD_HTTP_UNINITIALIZED
      64             :   },
      65             : 
      66             :   {
      67             :     .ec = TALER_EC_INVALID,
      68             :     .hint = gettext_noop ("An error response did not include an error code in the format expected by the client. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server."),
      69             :     .http_code = MHD_HTTP_UNINITIALIZED
      70             :   },
      71             : 
      72             :   {
      73             :     .ec = TALER_EC_GENERIC_CLIENT_INTERNAL_ERROR,
      74             :     .hint = gettext_noop ("An internal failure happened on the client side. Details should be in the local logs. Check if you are using the latest available version or file a report with the developers."),
      75             :     .http_code = MHD_HTTP_UNINITIALIZED
      76             :   },
      77             : 
      78             :   {
      79             :     .ec = TALER_EC_GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION,
      80             :     .hint = gettext_noop ("The client does not support the protocol version advertised by the server."),
      81             :     .http_code = MHD_HTTP_UNINITIALIZED
      82             :   },
      83             : 
      84             :   {
      85             :     .ec = TALER_EC_GENERIC_INVALID_RESPONSE,
      86             :     .hint = gettext_noop ("The response we got from the server was not in the expected format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server."),
      87             :     .http_code = MHD_HTTP_UNINITIALIZED
      88             :   },
      89             : 
      90             :   {
      91             :     .ec = TALER_EC_GENERIC_TIMEOUT,
      92             :     .hint = gettext_noop ("The operation timed out. Trying again might help. Check the network connection."),
      93             :     .http_code = MHD_HTTP_UNINITIALIZED
      94             :   },
      95             : 
      96             :   {
      97             :     .ec = TALER_EC_GENERIC_VERSION_MALFORMED,
      98             :     .hint = gettext_noop ("The protocol version given by the server does not follow the required format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server."),
      99             :     .http_code = MHD_HTTP_UNINITIALIZED
     100             :   },
     101             : 
     102             :   {
     103             :     .ec = TALER_EC_GENERIC_REPLY_MALFORMED,
     104             :     .hint = gettext_noop ("The service responded with a reply that was in the right data format, but the content did not satisfy the protocol. Please file a bug report."),
     105             :     .http_code = MHD_HTTP_UNINITIALIZED
     106             :   },
     107             : 
     108             :   {
     109             :     .ec = TALER_EC_GENERIC_CONFIGURATION_INVALID,
     110             :     .hint = gettext_noop ("There is an error in the client-side configuration, for example an option is set to an invalid value. Check the logs and fix the local configuration."),
     111             :     .http_code = MHD_HTTP_UNINITIALIZED
     112             :   },
     113             : 
     114             :   {
     115             :     .ec = TALER_EC_GENERIC_UNEXPECTED_REQUEST_ERROR,
     116             :     .hint = gettext_noop ("The client made a request to a service, but received an error response it does not know how to handle. Please file a bug report."),
     117             :     .http_code = MHD_HTTP_UNINITIALIZED
     118             :   },
     119             : 
     120             :   {
     121             :     .ec = TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT,
     122             :     .hint = gettext_noop ("The token used by the client to authorize the request does not grant the required permissions for the request. Check the requirements and obtain a suitable authorization token to proceed."),
     123             :     .http_code = MHD_HTTP_FORBIDDEN
     124             :   },
     125             : 
     126             :   {
     127             :     .ec = TALER_EC_GENERIC_METHOD_INVALID,
     128             :     .hint = gettext_noop ("The HTTP method used is invalid for this endpoint. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
     129             :     .http_code = MHD_HTTP_METHOD_NOT_ALLOWED
     130             :   },
     131             : 
     132             :   {
     133             :     .ec = TALER_EC_GENERIC_ENDPOINT_UNKNOWN,
     134             :     .hint = gettext_noop ("There is no endpoint defined for the URL provided by the client. Check if you used the correct URL and/or file a report with the developers of the client software."),
     135             :     .http_code = MHD_HTTP_NOT_FOUND
     136             :   },
     137             : 
     138             :   {
     139             :     .ec = TALER_EC_GENERIC_JSON_INVALID,
     140             :     .hint = gettext_noop ("The JSON in the client's request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
     141             :     .http_code = MHD_HTTP_BAD_REQUEST
     142             :   },
     143             : 
     144             :   {
     145             :     .ec = TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED,
     146             :     .hint = gettext_noop ("Some of the HTTP headers provided by the client were malformed and caused the server to not be able to handle the request. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
     147             :     .http_code = MHD_HTTP_BAD_REQUEST
     148             :   },
     149             : 
     150             :   {
     151             :     .ec = TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
     152             :     .hint = gettext_noop ("The payto:// URI provided by the client is malformed. Check that you are using the correct syntax as of RFC 8905 and/or that you entered the bank account number correctly."),
     153             :     .http_code = MHD_HTTP_BAD_REQUEST
     154             :   },
     155             : 
     156             :   {
     157             :     .ec = TALER_EC_GENERIC_PARAMETER_MISSING,
     158             :     .hint = gettext_noop ("A required parameter in the request was missing. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
     159             :     .http_code = MHD_HTTP_BAD_REQUEST
     160             :   },
     161             : 
     162             :   {
     163             :     .ec = TALER_EC_GENERIC_PARAMETER_MALFORMED,
     164             :     .hint = gettext_noop ("A parameter in the request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
     165             :     .http_code = MHD_HTTP_BAD_REQUEST
     166             :   },
     167             : 
     168             :   {
     169             :     .ec = TALER_EC_GENERIC_RESERVE_PUB_MALFORMED,
     170             :     .hint = gettext_noop ("The reserve public key was malformed."),
     171             :     .http_code = MHD_HTTP_BAD_REQUEST
     172             :   },
     173             : 
     174             :   {
     175             :     .ec = TALER_EC_GENERIC_COMPRESSION_INVALID,
     176             :     .hint = gettext_noop ("The body in the request could not be decompressed by the server. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
     177             :     .http_code = MHD_HTTP_BAD_REQUEST
     178             :   },
     179             : 
     180             :   {
     181             :     .ec = TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED,
     182             :     .hint = gettext_noop ("A segment in the path of the URL provided by the client is malformed. Check that you are using the correct encoding for the URL."),
     183             :     .http_code = MHD_HTTP_BAD_REQUEST
     184             :   },
     185             : 
     186             :   {
     187             :     .ec = TALER_EC_GENERIC_CURRENCY_MISMATCH,
     188             :     .hint = gettext_noop ("The currency involved in the operation is not acceptable for this server. Check your configuration and make sure the currency specified for a given service provider is one of the currencies supported by that provider."),
     189             :     .http_code = MHD_HTTP_BAD_REQUEST
     190             :   },
     191             : 
     192             :   {
     193             :     .ec = TALER_EC_GENERIC_URI_TOO_LONG,
     194             :     .hint = gettext_noop ("The URI is longer than the longest URI the HTTP server is willing to parse. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit."),
     195             :     .http_code = MHD_HTTP_URI_TOO_LONG
     196             :   },
     197             : 
     198             :   {
     199             :     .ec = TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT,
     200             :     .hint = gettext_noop ("The body is too large to be permissible for the endpoint. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit."),
     201             :     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
     202             :   },
     203             : 
     204             :   {
     205             :     .ec = TALER_EC_GENERIC_UNAUTHORIZED,
     206             :     .hint = gettext_noop ("The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner."),
     207             :     .http_code = MHD_HTTP_UNAUTHORIZED
     208             :   },
     209             : 
     210             :   {
     211             :     .ec = TALER_EC_GENERIC_TOKEN_UNKNOWN,
     212             :     .hint = gettext_noop ("The service refused the request as the given authorization token is unknown. You should request a valid access token from the account owner."),
     213             :     .http_code = MHD_HTTP_UNAUTHORIZED
     214             :   },
     215             : 
     216             :   {
     217             :     .ec = TALER_EC_GENERIC_TOKEN_EXPIRED,
     218             :     .hint = gettext_noop ("The service refused the request as the given authorization token expired. You should request a fresh authorization token from the account owner."),
     219             :     .http_code = MHD_HTTP_UNAUTHORIZED
     220             :   },
     221             : 
     222             :   {
     223             :     .ec = TALER_EC_GENERIC_TOKEN_MALFORMED,
     224             :     .hint = gettext_noop ("The service refused the request as the given authorization token is invalid or malformed. You should check that you have the right credentials."),
     225             :     .http_code = MHD_HTTP_UNAUTHORIZED
     226             :   },
     227             : 
     228             :   {
     229             :     .ec = TALER_EC_GENERIC_FORBIDDEN,
     230             :     .hint = gettext_noop ("The service refused the request due to lack of proper rights on the resource. You may need different credentials to be allowed to perform this operation."),
     231             :     .http_code = MHD_HTTP_FORBIDDEN
     232             :   },
     233             : 
     234             :   {
     235             :     .ec = TALER_EC_GENERIC_DB_SETUP_FAILED,
     236             :     .hint = gettext_noop ("The service failed initialize its connection to the database. The system administrator should check that the service has permissions to access the database and that the database is running."),
     237             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     238             :   },
     239             : 
     240             :   {
     241             :     .ec = TALER_EC_GENERIC_DB_START_FAILED,
     242             :     .hint = gettext_noop ("The service encountered an error event to just start the database transaction. The system administrator should check that the database is running."),
     243             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     244             :   },
     245             : 
     246             :   {
     247             :     .ec = TALER_EC_GENERIC_DB_STORE_FAILED,
     248             :     .hint = gettext_noop ("The service failed to store information in its database. The system administrator should check that the database is running and review the service logs."),
     249             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     250             :   },
     251             : 
     252             :   {
     253             :     .ec = TALER_EC_GENERIC_DB_FETCH_FAILED,
     254             :     .hint = gettext_noop ("The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs."),
     255             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     256             :   },
     257             : 
     258             :   {
     259             :     .ec = TALER_EC_GENERIC_DB_COMMIT_FAILED,
     260             :     .hint = gettext_noop ("The service encountered an unrecoverable error trying to commit a transaction to the database. The system administrator should check that the database is running and review the service logs."),
     261             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     262             :   },
     263             : 
     264             :   {
     265             :     .ec = TALER_EC_GENERIC_DB_SOFT_FAILURE,
     266             :     .hint = gettext_noop ("The service encountered an error event to commit the database transaction, even after repeatedly retrying it there was always a conflicting transaction. This indicates a repeated serialization error; it should only happen if some client maliciously tries to create conflicting concurrent transactions. It could also be a sign of a missing index. Check if you are using the latest available version and/or file a report with the developers."),
     267             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     268             :   },
     269             : 
     270             :   {
     271             :     .ec = TALER_EC_GENERIC_DB_INVARIANT_FAILURE,
     272             :     .hint = gettext_noop ("The service's database is inconsistent and violates service-internal invariants. Check if you are using the latest available version and/or file a report with the developers."),
     273             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     274             :   },
     275             : 
     276             :   {
     277             :     .ec = TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE,
     278             :     .hint = gettext_noop ("The HTTP server experienced an internal invariant failure (bug). Check if you are using the latest available version and/or file a report with the developers."),
     279             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     280             :   },
     281             : 
     282             :   {
     283             :     .ec = TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH,
     284             :     .hint = gettext_noop ("The service could not compute a cryptographic hash over some JSON value. Check if you are using the latest available version and/or file a report with the developers."),
     285             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     286             :   },
     287             : 
     288             :   {
     289             :     .ec = TALER_EC_GENERIC_FAILED_COMPUTE_AMOUNT,
     290             :     .hint = gettext_noop ("The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers."),
     291             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     292             :   },
     293             : 
     294             :   {
     295             :     .ec = TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY,
     296             :     .hint = gettext_noop ("The HTTP server had insufficient memory to parse the request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
     297             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     298             :   },
     299             : 
     300             :   {
     301             :     .ec = TALER_EC_GENERIC_ALLOCATION_FAILURE,
     302             :     .hint = gettext_noop ("The HTTP server failed to allocate memory. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
     303             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     304             :   },
     305             : 
     306             :   {
     307             :     .ec = TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE,
     308             :     .hint = gettext_noop ("The HTTP server failed to allocate memory for building JSON reply. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
     309             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     310             :   },
     311             : 
     312             :   {
     313             :     .ec = TALER_EC_GENERIC_CURL_ALLOCATION_FAILURE,
     314             :     .hint = gettext_noop ("The HTTP server failed to allocate memory for making a CURL request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
     315             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     316             :   },
     317             : 
     318             :   {
     319             :     .ec = TALER_EC_GENERIC_FAILED_TO_LOAD_TEMPLATE,
     320             :     .hint = gettext_noop ("The backend could not locate a required template to generate an HTML reply. The system administrator should check if the resource files are installed in the correct location and are readable to the service."),
     321             :     .http_code = MHD_HTTP_NOT_ACCEPTABLE
     322             :   },
     323             : 
     324             :   {
     325             :     .ec = TALER_EC_GENERIC_FAILED_TO_EXPAND_TEMPLATE,
     326             :     .hint = gettext_noop ("The backend could not expand the template to generate an HTML reply. The system administrator should investigate the logs and check if the templates are well-formed."),
     327             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     328             :   },
     329             : 
     330             :   {
     331             :     .ec = TALER_EC_EXCHANGE_GENERIC_BAD_CONFIGURATION,
     332             :     .hint = gettext_noop ("Exchange is badly configured and thus cannot operate."),
     333             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     334             :   },
     335             : 
     336             :   {
     337             :     .ec = TALER_EC_EXCHANGE_GENERIC_OPERATION_UNKNOWN,
     338             :     .hint = gettext_noop ("Operation specified unknown for this endpoint."),
     339             :     .http_code = MHD_HTTP_NOT_FOUND
     340             :   },
     341             : 
     342             :   {
     343             :     .ec = TALER_EC_EXCHANGE_GENERIC_WRONG_NUMBER_OF_SEGMENTS,
     344             :     .hint = gettext_noop ("The number of segments included in the URI does not match the number of segments expected by the endpoint."),
     345             :     .http_code = MHD_HTTP_NOT_FOUND
     346             :   },
     347             : 
     348             :   {
     349             :     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_DENOMINATION_KEY,
     350             :     .hint = gettext_noop ("The same coin was already used with a different denomination previously."),
     351             :     .http_code = MHD_HTTP_CONFLICT
     352             :   },
     353             : 
     354             :   {
     355             :     .ec = TALER_EC_EXCHANGE_GENERIC_COINS_INVALID_COIN_PUB,
     356             :     .hint = gettext_noop ("The public key of given to a \"/coins/\" endpoint of the exchange was malformed."),
     357             :     .http_code = MHD_HTTP_BAD_REQUEST
     358             :   },
     359             : 
     360             :   {
     361             :     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN,
     362             :     .hint = gettext_noop ("The exchange is not aware of the denomination key the wallet requested for the operation."),
     363             :     .http_code = MHD_HTTP_NOT_FOUND
     364             :   },
     365             : 
     366             :   {
     367             :     .ec = TALER_EC_EXCHANGE_DENOMINATION_SIGNATURE_INVALID,
     368             :     .hint = gettext_noop ("The signature of the denomination key over the coin is not valid."),
     369             :     .http_code = MHD_HTTP_FORBIDDEN
     370             :   },
     371             : 
     372             :   {
     373             :     .ec = TALER_EC_EXCHANGE_GENERIC_KEYS_MISSING,
     374             :     .hint = gettext_noop ("The exchange failed to perform the operation as it could not find the private keys. This is a problem with the exchange setup, not with the client's request."),
     375             :     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
     376             :   },
     377             : 
     378             :   {
     379             :     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE,
     380             :     .hint = gettext_noop ("Validity period of the denomination lies in the future."),
     381             :     .http_code = MHD_HTTP_PRECONDITION_FAILED
     382             :   },
     383             : 
     384             :   {
     385             :     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_EXPIRED,
     386             :     .hint = gettext_noop ("Denomination key of the coin is past its expiration time for the requested operation."),
     387             :     .http_code = MHD_HTTP_GONE
     388             :   },
     389             : 
     390             :   {
     391             :     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_REVOKED,
     392             :     .hint = gettext_noop ("Denomination key of the coin has been revoked."),
     393             :     .http_code = MHD_HTTP_GONE
     394             :   },
     395             : 
     396             :   {
     397             :     .ec = TALER_EC_EXCHANGE_GENERIC_SECMOD_TIMEOUT,
     398             :     .hint = gettext_noop ("An operation where the exchange interacted with a security module timed out."),
     399             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     400             :   },
     401             : 
     402             :   {
     403             :     .ec = TALER_EC_EXCHANGE_GENERIC_INSUFFICIENT_FUNDS,
     404             :     .hint = gettext_noop ("The respective coin did not have sufficient residual value for the operation.  The \"history\" in this response provides the \"residual_value\" of the coin, which may be less than its \"original_value\"."),
     405             :     .http_code = MHD_HTTP_CONFLICT
     406             :   },
     407             : 
     408             :   {
     409             :     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_HISTORY_COMPUTATION_FAILED,
     410             :     .hint = gettext_noop ("The exchange had an internal error reconstructing the transaction history of the coin that was being processed."),
     411             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     412             :   },
     413             : 
     414             :   {
     415             :     .ec = TALER_EC_EXCHANGE_GENERIC_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS,
     416             :     .hint = gettext_noop ("The exchange failed to obtain the transaction history of the given coin from the database while generating an insufficient funds errors."),
     417             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     418             :   },
     419             : 
     420             :   {
     421             :     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH,
     422             :     .hint = gettext_noop ("The same coin was already used with a different age hash previously."),
     423             :     .http_code = MHD_HTTP_CONFLICT
     424             :   },
     425             : 
     426             :   {
     427             :     .ec = TALER_EC_EXCHANGE_GENERIC_INVALID_DENOMINATION_CIPHER_FOR_OPERATION,
     428             :     .hint = gettext_noop ("The requested operation is not valid for the cipher used by the selected denomination."),
     429             :     .http_code = MHD_HTTP_BAD_REQUEST
     430             :   },
     431             : 
     432             :   {
     433             :     .ec = TALER_EC_EXCHANGE_GENERIC_CIPHER_MISMATCH,
     434             :     .hint = gettext_noop ("The provided arguments for the operation use inconsistent ciphers."),
     435             :     .http_code = MHD_HTTP_BAD_REQUEST
     436             :   },
     437             : 
     438             :   {
     439             :     .ec = TALER_EC_EXCHANGE_GENERIC_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE,
     440             :     .hint = gettext_noop ("The number of denominations specified in the request exceeds the limit of the exchange."),
     441             :     .http_code = MHD_HTTP_BAD_REQUEST
     442             :   },
     443             : 
     444             :   {
     445             :     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_UNKNOWN,
     446             :     .hint = gettext_noop ("The coin is not known to the exchange (yet)."),
     447             :     .http_code = MHD_HTTP_NOT_FOUND
     448             :   },
     449             : 
     450             :   {
     451             :     .ec = TALER_EC_EXCHANGE_GENERIC_CLOCK_SKEW,
     452             :     .hint = gettext_noop ("The time at the server is too far off from the time specified in the request. Most likely the client system time is wrong."),
     453             :     .http_code = MHD_HTTP_BAD_REQUEST
     454             :   },
     455             : 
     456             :   {
     457             :     .ec = TALER_EC_EXCHANGE_GENERIC_AMOUNT_EXCEEDS_DENOMINATION_VALUE,
     458             :     .hint = gettext_noop ("The specified amount for the coin is higher than the value of the denomination of the coin."),
     459             :     .http_code = MHD_HTTP_BAD_REQUEST
     460             :   },
     461             : 
     462             :   {
     463             :     .ec = TALER_EC_EXCHANGE_GENERIC_GLOBAL_FEES_MISSING,
     464             :     .hint = gettext_noop ("The exchange was not properly configured with global fees."),
     465             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     466             :   },
     467             : 
     468             :   {
     469             :     .ec = TALER_EC_EXCHANGE_GENERIC_WIRE_FEES_MISSING,
     470             :     .hint = gettext_noop ("The exchange was not properly configured with wire fees."),
     471             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     472             :   },
     473             : 
     474             :   {
     475             :     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_PUB_MALFORMED,
     476             :     .hint = gettext_noop ("The purse public key was malformed."),
     477             :     .http_code = MHD_HTTP_BAD_REQUEST
     478             :   },
     479             : 
     480             :   {
     481             :     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_UNKNOWN,
     482             :     .hint = gettext_noop ("The purse is unknown."),
     483             :     .http_code = MHD_HTTP_NOT_FOUND
     484             :   },
     485             : 
     486             :   {
     487             :     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_EXPIRED,
     488             :     .hint = gettext_noop ("The purse has expired."),
     489             :     .http_code = MHD_HTTP_GONE
     490             :   },
     491             : 
     492             :   {
     493             :     .ec = TALER_EC_EXCHANGE_GENERIC_RESERVE_UNKNOWN,
     494             :     .hint = gettext_noop ("The exchange has no information about the \"reserve_pub\" that was given."),
     495             :     .http_code = MHD_HTTP_NOT_FOUND
     496             :   },
     497             : 
     498             :   {
     499             :     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_REQUIRED,
     500             :     .hint = gettext_noop ("The exchange is not allowed to proceed with the operation until the client has satisfied a KYC check."),
     501             :     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
     502             :   },
     503             : 
     504             :   {
     505             :     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT,
     506             :     .hint = gettext_noop ("Inconsistency between provided age commitment and attest: either none or both must be provided"),
     507             :     .http_code = MHD_HTTP_BAD_REQUEST
     508             :   },
     509             : 
     510             :   {
     511             :     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE,
     512             :     .hint = gettext_noop ("The provided attestation for the minimum age couldn't be verified by the exchange."),
     513             :     .http_code = MHD_HTTP_BAD_REQUEST
     514             :   },
     515             : 
     516             :   {
     517             :     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_DELETED,
     518             :     .hint = gettext_noop ("The purse was deleted."),
     519             :     .http_code = MHD_HTTP_GONE
     520             :   },
     521             : 
     522             :   {
     523             :     .ec = TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_PUB_MALFORMED,
     524             :     .hint = gettext_noop ("The public key of the AML officer in the URL was malformed."),
     525             :     .http_code = MHD_HTTP_BAD_REQUEST
     526             :   },
     527             : 
     528             :   {
     529             :     .ec = TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_GET_SIGNATURE_INVALID,
     530             :     .hint = gettext_noop ("The signature affirming the GET request of the AML officer is invalid."),
     531             :     .http_code = MHD_HTTP_FORBIDDEN
     532             :   },
     533             : 
     534             :   {
     535             :     .ec = TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED,
     536             :     .hint = gettext_noop ("The specified AML officer does not have access at this time."),
     537             :     .http_code = MHD_HTTP_FORBIDDEN
     538             :   },
     539             : 
     540             :   {
     541             :     .ec = TALER_EC_EXCHANGE_GENERIC_AML_PENDING,
     542             :     .hint = gettext_noop ("The requested operation is denied pending the resolution of an anti-money laundering investigation by the exchange operator. This is a manual process, please wait and retry later."),
     543             :     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
     544             :   },
     545             : 
     546             :   {
     547             :     .ec = TALER_EC_EXCHANGE_GENERIC_AML_FROZEN,
     548             :     .hint = gettext_noop ("The requested operation is denied as the account was frozen on suspicion of money laundering. Please contact the exchange operator."),
     549             :     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
     550             :   },
     551             : 
     552             :   {
     553             :     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_CONVERTER_FAILED,
     554             :     .hint = gettext_noop ("The exchange failed to start a KYC attribute conversion helper process. It is likely configured incorrectly."),
     555             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     556             :   },
     557             : 
     558             :   {
     559             :     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_FAILED,
     560             :     .hint = gettext_noop ("The KYC operation failed. This could be because the KYC provider rejected the KYC data provided, or because the user aborted the KYC process."),
     561             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     562             :   },
     563             : 
     564             :   {
     565             :     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_FAILED,
     566             :     .hint = gettext_noop ("A fallback measure for a KYC operation failed. This is a bug. Users should contact the exchange operator."),
     567             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     568             :   },
     569             : 
     570             :   {
     571             :     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_UNKNOWN,
     572             :     .hint = gettext_noop ("The specified fallback measure for a KYC operation is unknown. This is a bug. Users should contact the exchange operator."),
     573             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     574             :   },
     575             : 
     576             :   {
     577             :     .ec = TALER_EC_EXCHANGE_GENERIC_BANK_ACCOUNT_UNKNOWN,
     578             :     .hint = gettext_noop ("The exchange is not aware of the bank account (payto URI or hash thereof) specified in the request and thus cannot perform the requested operation. The client should check that the select account is correct."),
     579             :     .http_code = MHD_HTTP_NOT_FOUND
     580             :   },
     581             : 
     582             :   {
     583             :     .ec = TALER_EC_EXCHANGE_GENERIC_AML_PROGRAM_RECURSION_DETECTED,
     584             :     .hint = gettext_noop ("The AML processing at the exchange did not terminate in an adequate timeframe. This is likely a configuration problem at the payment service provider. Users should contact the exchange operator."),
     585             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     586             :   },
     587             : 
     588             :   {
     589             :     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_SANCTION_LIST_CHECK_FAILED,
     590             :     .hint = gettext_noop ("A check against sanction lists failed. This is indicative of an internal error in the sanction list processing logic. This needs to be investigated by the exchange operator."),
     591             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     592             :   },
     593             : 
     594             :   {
     595             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_NOT_FOUND,
     596             :     .hint = gettext_noop ("The exchange did not find information about the specified transaction in the database."),
     597             :     .http_code = MHD_HTTP_NOT_FOUND
     598             :   },
     599             : 
     600             :   {
     601             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_H_WIRE,
     602             :     .hint = gettext_noop ("The wire hash of given to a \"/deposits/\" handler was malformed."),
     603             :     .http_code = MHD_HTTP_BAD_REQUEST
     604             :   },
     605             : 
     606             :   {
     607             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_MERCHANT_PUB,
     608             :     .hint = gettext_noop ("The merchant key of given to a \"/deposits/\" handler was malformed."),
     609             :     .http_code = MHD_HTTP_BAD_REQUEST
     610             :   },
     611             : 
     612             :   {
     613             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_H_CONTRACT_TERMS,
     614             :     .hint = gettext_noop ("The hash of the contract terms given to a \"/deposits/\" handler was malformed."),
     615             :     .http_code = MHD_HTTP_BAD_REQUEST
     616             :   },
     617             : 
     618             :   {
     619             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_COIN_PUB,
     620             :     .hint = gettext_noop ("The coin public key of given to a \"/deposits/\" handler was malformed."),
     621             :     .http_code = MHD_HTTP_BAD_REQUEST
     622             :   },
     623             : 
     624             :   {
     625             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_SIGNATURE_BY_EXCHANGE,
     626             :     .hint = gettext_noop ("The signature returned by the exchange in a /deposits/ request was malformed."),
     627             :     .http_code = MHD_HTTP_UNINITIALIZED
     628             :   },
     629             : 
     630             :   {
     631             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_MERCHANT_SIGNATURE_INVALID,
     632             :     .hint = gettext_noop ("The signature of the merchant is invalid."),
     633             :     .http_code = MHD_HTTP_FORBIDDEN
     634             :   },
     635             : 
     636             :   {
     637             :     .ec = TALER_EC_EXCHANGE_DEPOSITS_POLICY_NOT_ACCEPTED,
     638             :     .hint = gettext_noop ("The provided policy data was not accepted"),
     639             :     .http_code = MHD_HTTP_BAD_REQUEST
     640             :   },
     641             : 
     642             :   {
     643             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS,
     644             :     .hint = gettext_noop ("The given reserve does not have sufficient funds to admit the requested withdraw operation at this time.  The response includes the current \"balance\" of the reserve as well as the transaction \"history\" that lead to this balance."),
     645             :     .http_code = MHD_HTTP_CONFLICT
     646             :   },
     647             : 
     648             :   {
     649             :     .ec = TALER_EC_EXCHANGE_AGE_WITHDRAW_INSUFFICIENT_FUNDS,
     650             :     .hint = gettext_noop ("The given reserve does not have sufficient funds to admit the requested age-withdraw operation at this time.  The response includes the current \"balance\" of the reserve as well as the transaction \"history\" that lead to this balance."),
     651             :     .http_code = MHD_HTTP_CONFLICT
     652             :   },
     653             : 
     654             :   {
     655             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_AMOUNT_FEE_OVERFLOW,
     656             :     .hint = gettext_noop ("The amount to withdraw together with the fee exceeds the numeric range for Taler amounts.  This is not a client failure, as the coin value and fees come from the exchange's configuration."),
     657             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     658             :   },
     659             : 
     660             :   {
     661             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_SIGNATURE_FAILED,
     662             :     .hint = gettext_noop ("The exchange failed to create the signature using the denomination key."),
     663             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     664             :   },
     665             : 
     666             :   {
     667             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_RESERVE_SIGNATURE_INVALID,
     668             :     .hint = gettext_noop ("The signature of the reserve is not valid."),
     669             :     .http_code = MHD_HTTP_FORBIDDEN
     670             :   },
     671             : 
     672             :   {
     673             :     .ec = TALER_EC_EXCHANGE_RESERVE_HISTORY_ERROR_INSUFFICIENT_FUNDS,
     674             :     .hint = gettext_noop ("When computing the reserve history, we ended up with a negative overall balance, which should be impossible."),
     675             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     676             :   },
     677             : 
     678             :   {
     679             :     .ec = TALER_EC_EXCHANGE_GET_RESERVE_HISTORY_ERROR_INSUFFICIENT_BALANCE,
     680             :     .hint = gettext_noop ("The reserve did not have sufficient funds in it to pay for a full reserve history statement."),
     681             :     .http_code = MHD_HTTP_CONFLICT
     682             :   },
     683             : 
     684             :   {
     685             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_DENOMINATION_KEY_LOST,
     686             :     .hint = gettext_noop ("Withdraw period of the coin to be withdrawn is in the past."),
     687             :     .http_code = MHD_HTTP_GONE
     688             :   },
     689             : 
     690             :   {
     691             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_UNBLIND_FAILURE,
     692             :     .hint = gettext_noop ("The client failed to unblind the blind signature."),
     693             :     .http_code = MHD_HTTP_UNINITIALIZED
     694             :   },
     695             : 
     696             :   {
     697             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_NONCE_REUSE,
     698             :     .hint = gettext_noop ("The client reused a withdraw nonce, which is not allowed."),
     699             :     .http_code = MHD_HTTP_CONFLICT
     700             :   },
     701             : 
     702             :   {
     703             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_COMMITMENT_UNKNOWN,
     704             :     .hint = gettext_noop ("The client provided an unknown commitment for an age-withdraw request."),
     705             :     .http_code = MHD_HTTP_BAD_REQUEST
     706             :   },
     707             : 
     708             :   {
     709             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_AMOUNT_OVERFLOW,
     710             :     .hint = gettext_noop ("The total sum of amounts from the denominations did overflow."),
     711             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     712             :   },
     713             : 
     714             :   {
     715             :     .ec = TALER_EC_EXCHANGE_AGE_WITHDRAW_AMOUNT_INCORRECT,
     716             :     .hint = gettext_noop ("The total sum of value and fees from the denominations differs from the committed amount with fees."),
     717             :     .http_code = MHD_HTTP_BAD_REQUEST
     718             :   },
     719             : 
     720             :   {
     721             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_REVEAL_INVALID_HASH,
     722             :     .hint = gettext_noop ("The original commitment differs from the calculated hash"),
     723             :     .http_code = MHD_HTTP_BAD_REQUEST
     724             :   },
     725             : 
     726             :   {
     727             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_MAXIMUM_AGE_TOO_LARGE,
     728             :     .hint = gettext_noop ("The maximum age in the commitment is too large for the reserve"),
     729             :     .http_code = MHD_HTTP_CONFLICT
     730             :   },
     731             : 
     732             :   {
     733             :     .ec = TALER_EC_EXCHANGE_WITHDRAW_IDEMPOTENT_PLANCHET,
     734             :     .hint = gettext_noop ("The batch withdraw included a planchet that was already withdrawn. This is not allowed."),
     735             :     .http_code = MHD_HTTP_CONFLICT
     736             :   },
     737             : 
     738             :   {
     739             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_COIN_SIGNATURE_INVALID,
     740             :     .hint = gettext_noop ("The signature made by the coin over the deposit permission is not valid."),
     741             :     .http_code = MHD_HTTP_FORBIDDEN
     742             :   },
     743             : 
     744             :   {
     745             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_CONFLICTING_CONTRACT,
     746             :     .hint = gettext_noop ("The same coin was already deposited for the same merchant and contract with other details."),
     747             :     .http_code = MHD_HTTP_CONFLICT
     748             :   },
     749             : 
     750             :   {
     751             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE,
     752             :     .hint = gettext_noop ("The stated value of the coin after the deposit fee is subtracted would be negative."),
     753             :     .http_code = MHD_HTTP_BAD_REQUEST
     754             :   },
     755             : 
     756             :   {
     757             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_REFUND_DEADLINE_AFTER_WIRE_DEADLINE,
     758             :     .hint = gettext_noop ("The stated refund deadline is after the wire deadline."),
     759             :     .http_code = MHD_HTTP_BAD_REQUEST
     760             :   },
     761             : 
     762             :   {
     763             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_WIRE_DEADLINE_IS_NEVER,
     764             :     .hint = gettext_noop ("The stated wire deadline is \"never\", which makes no sense."),
     765             :     .http_code = MHD_HTTP_BAD_REQUEST
     766             :   },
     767             : 
     768             :   {
     769             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_JSON,
     770             :     .hint = gettext_noop ("The exchange failed to canonicalize and hash the given wire format. For example, the merchant failed to provide the \"salt\" or a valid payto:// URI in the wire details.  Note that while the exchange will do some basic sanity checking on the wire details, it cannot warrant that the banking system will ultimately be able to route to the specified address, even if this check passed."),
     771             :     .http_code = MHD_HTTP_BAD_REQUEST
     772             :   },
     773             : 
     774             :   {
     775             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_CONTRACT_HASH_CONFLICT,
     776             :     .hint = gettext_noop ("The hash of the given wire address does not match the wire hash specified in the proposal data."),
     777             :     .http_code = MHD_HTTP_BAD_REQUEST
     778             :   },
     779             : 
     780             :   {
     781             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE,
     782             :     .hint = gettext_noop ("The signature provided by the exchange is not valid."),
     783             :     .http_code = MHD_HTTP_UNINITIALIZED
     784             :   },
     785             : 
     786             :   {
     787             :     .ec = TALER_EC_EXCHANGE_DEPOSIT_FEE_ABOVE_AMOUNT,
     788             :     .hint = gettext_noop ("The deposited amount is smaller than the deposit fee, which would result in a negative contribution."),
     789             :     .http_code = MHD_HTTP_BAD_REQUEST
     790             :   },
     791             : 
     792             :   {
     793             :     .ec = TALER_EC_EXCHANGE_EXTENSIONS_INVALID_FULFILLMENT,
     794             :     .hint = gettext_noop ("The proof of policy fulfillment was invalid."),
     795             :     .http_code = MHD_HTTP_BAD_REQUEST
     796             :   },
     797             : 
     798             :   {
     799             :     .ec = TALER_EC_EXCHANGE_COIN_HISTORY_BAD_SIGNATURE,
     800             :     .hint = gettext_noop ("The coin history was requested with a bad signature."),
     801             :     .http_code = MHD_HTTP_FORBIDDEN
     802             :   },
     803             : 
     804             :   {
     805             :     .ec = TALER_EC_EXCHANGE_RESERVE_HISTORY_BAD_SIGNATURE,
     806             :     .hint = gettext_noop ("The reserve history was requested with a bad signature."),
     807             :     .http_code = MHD_HTTP_FORBIDDEN
     808             :   },
     809             : 
     810             :   {
     811             :     .ec = TALER_EC_EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION,
     812             :     .hint = gettext_noop ("The exchange encountered melt fees exceeding the melted coin's contribution."),
     813             :     .http_code = MHD_HTTP_BAD_REQUEST
     814             :   },
     815             : 
     816             :   {
     817             :     .ec = TALER_EC_EXCHANGE_MELT_COIN_SIGNATURE_INVALID,
     818             :     .hint = gettext_noop ("The signature made with the coin to be melted is invalid."),
     819             :     .http_code = MHD_HTTP_FORBIDDEN
     820             :   },
     821             : 
     822             :   {
     823             :     .ec = TALER_EC_EXCHANGE_MELT_COIN_EXPIRED_NO_ZOMBIE,
     824             :     .hint = gettext_noop ("The denomination of the given coin has past its expiration date and it is also not a valid zombie (that is, was not refreshed with the fresh coin being subjected to recoup)."),
     825             :     .http_code = MHD_HTTP_BAD_REQUEST
     826             :   },
     827             : 
     828             :   {
     829             :     .ec = TALER_EC_EXCHANGE_MELT_INVALID_SIGNATURE_BY_EXCHANGE,
     830             :     .hint = gettext_noop ("The signature returned by the exchange in a melt request was malformed."),
     831             :     .http_code = MHD_HTTP_UNINITIALIZED
     832             :   },
     833             : 
     834             :   {
     835             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_COMMITMENT_VIOLATION,
     836             :     .hint = gettext_noop ("The provided transfer keys do not match up with the original commitment.  Information about the original commitment is included in the response."),
     837             :     .http_code = MHD_HTTP_CONFLICT
     838             :   },
     839             : 
     840             :   {
     841             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_SIGNING_ERROR,
     842             :     .hint = gettext_noop ("Failed to produce the blinded signatures over the coins to be returned."),
     843             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     844             :   },
     845             : 
     846             :   {
     847             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_SESSION_UNKNOWN,
     848             :     .hint = gettext_noop ("The exchange is unaware of the refresh session specified in the request."),
     849             :     .http_code = MHD_HTTP_NOT_FOUND
     850             :   },
     851             : 
     852             :   {
     853             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_CNC_TRANSFER_ARRAY_SIZE_INVALID,
     854             :     .hint = gettext_noop ("The size of the cut-and-choose dimension of the private transfer keys request does not match #TALER_CNC_KAPPA - 1."),
     855             :     .http_code = MHD_HTTP_BAD_REQUEST
     856             :   },
     857             : 
     858             :   {
     859             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISMATCH,
     860             :     .hint = gettext_noop ("The number of envelopes given does not match the number of denomination keys given."),
     861             :     .http_code = MHD_HTTP_BAD_REQUEST
     862             :   },
     863             : 
     864             :   {
     865             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_COST_CALCULATION_OVERFLOW,
     866             :     .hint = gettext_noop ("The exchange encountered a numeric overflow totaling up the cost for the refresh operation."),
     867             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     868             :   },
     869             : 
     870             :   {
     871             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_AMOUNT_INSUFFICIENT,
     872             :     .hint = gettext_noop ("The exchange's cost calculation shows that the melt amount is below the costs of the transaction."),
     873             :     .http_code = MHD_HTTP_BAD_REQUEST
     874             :   },
     875             : 
     876             :   {
     877             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_LINK_SIGNATURE_INVALID,
     878             :     .hint = gettext_noop ("The signature made with the coin over the link data is invalid."),
     879             :     .http_code = MHD_HTTP_FORBIDDEN
     880             :   },
     881             : 
     882             :   {
     883             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_INVALID_RCH,
     884             :     .hint = gettext_noop ("The refresh session hash given to a /refreshes/ handler was malformed."),
     885             :     .http_code = MHD_HTTP_BAD_REQUEST
     886             :   },
     887             : 
     888             :   {
     889             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_OPERATION_INVALID,
     890             :     .hint = gettext_noop ("Operation specified invalid for this endpoint."),
     891             :     .http_code = MHD_HTTP_BAD_REQUEST
     892             :   },
     893             : 
     894             :   {
     895             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_NOT_SUPPORTED,
     896             :     .hint = gettext_noop ("The client provided age commitment data, but age restriction is not supported on this server."),
     897             :     .http_code = MHD_HTTP_BAD_REQUEST
     898             :   },
     899             : 
     900             :   {
     901             :     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_COMMITMENT_INVALID,
     902             :     .hint = gettext_noop ("The client provided invalid age commitment data: missing, not an array, or  array of invalid size."),
     903             :     .http_code = MHD_HTTP_BAD_REQUEST
     904             :   },
     905             : 
     906             :   {
     907             :     .ec = TALER_EC_EXCHANGE_LINK_COIN_UNKNOWN,
     908             :     .hint = gettext_noop ("The coin specified in the link request is unknown to the exchange."),
     909             :     .http_code = MHD_HTTP_NOT_FOUND
     910             :   },
     911             : 
     912             :   {
     913             :     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_MALFORMED,
     914             :     .hint = gettext_noop ("The public key of given to a /transfers/ handler was malformed."),
     915             :     .http_code = MHD_HTTP_BAD_REQUEST
     916             :   },
     917             : 
     918             :   {
     919             :     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_NOT_FOUND,
     920             :     .hint = gettext_noop ("The exchange did not find information about the specified wire transfer identifier in the database."),
     921             :     .http_code = MHD_HTTP_NOT_FOUND
     922             :   },
     923             : 
     924             :   {
     925             :     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_NOT_FOUND,
     926             :     .hint = gettext_noop ("The exchange did not find information about the wire transfer fees it charged."),
     927             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     928             :   },
     929             : 
     930             :   {
     931             :     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_INCONSISTENT,
     932             :     .hint = gettext_noop ("The exchange found a wire fee that was above the total transfer value (and thus could not have been charged)."),
     933             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     934             :   },
     935             : 
     936             :   {
     937             :     .ec = TALER_EC_EXCHANGE_PURSES_INVALID_WAIT_TARGET,
     938             :     .hint = gettext_noop ("The wait target of the URL was not in the set of expected values."),
     939             :     .http_code = MHD_HTTP_BAD_REQUEST
     940             :   },
     941             : 
     942             :   {
     943             :     .ec = TALER_EC_EXCHANGE_PURSES_GET_INVALID_SIGNATURE_BY_EXCHANGE,
     944             :     .hint = gettext_noop ("The signature on the purse status returned by the exchange was invalid."),
     945             :     .http_code = MHD_HTTP_UNINITIALIZED
     946             :   },
     947             : 
     948             :   {
     949             :     .ec = TALER_EC_EXCHANGE_REFUND_COIN_NOT_FOUND,
     950             :     .hint = gettext_noop ("The exchange knows literally nothing about the coin we were asked to refund. But without a transaction history, we cannot issue a refund. This is kind-of OK, the owner should just refresh it directly without executing the refund."),
     951             :     .http_code = MHD_HTTP_NOT_FOUND
     952             :   },
     953             : 
     954             :   {
     955             :     .ec = TALER_EC_EXCHANGE_REFUND_CONFLICT_DEPOSIT_INSUFFICIENT,
     956             :     .hint = gettext_noop ("We could not process the refund request as the coin's transaction history does not permit the requested refund because then refunds would exceed the deposit amount.  The \"history\" in the response proves this."),
     957             :     .http_code = MHD_HTTP_CONFLICT
     958             :   },
     959             : 
     960             :   {
     961             :     .ec = TALER_EC_EXCHANGE_REFUND_DEPOSIT_NOT_FOUND,
     962             :     .hint = gettext_noop ("The exchange knows about the coin we were asked to refund, but not about the specific /deposit operation.  Hence, we cannot issue a refund (as we do not know if this merchant public key is authorized to do a refund)."),
     963             :     .http_code = MHD_HTTP_NOT_FOUND
     964             :   },
     965             : 
     966             :   {
     967             :     .ec = TALER_EC_EXCHANGE_REFUND_MERCHANT_ALREADY_PAID,
     968             :     .hint = gettext_noop ("The exchange can no longer refund the customer/coin as the money was already transferred (paid out) to the merchant. (It should be past the refund deadline.)"),
     969             :     .http_code = MHD_HTTP_GONE
     970             :   },
     971             : 
     972             :   {
     973             :     .ec = TALER_EC_EXCHANGE_REFUND_FEE_TOO_LOW,
     974             :     .hint = gettext_noop ("The refund fee specified for the request is lower than the refund fee charged by the exchange for the given denomination key of the refunded coin."),
     975             :     .http_code = MHD_HTTP_BAD_REQUEST
     976             :   },
     977             : 
     978             :   {
     979             :     .ec = TALER_EC_EXCHANGE_REFUND_FEE_ABOVE_AMOUNT,
     980             :     .hint = gettext_noop ("The refunded amount is smaller than the refund fee, which would result in a negative refund."),
     981             :     .http_code = MHD_HTTP_BAD_REQUEST
     982             :   },
     983             : 
     984             :   {
     985             :     .ec = TALER_EC_EXCHANGE_REFUND_MERCHANT_SIGNATURE_INVALID,
     986             :     .hint = gettext_noop ("The signature of the merchant is invalid."),
     987             :     .http_code = MHD_HTTP_FORBIDDEN
     988             :   },
     989             : 
     990             :   {
     991             :     .ec = TALER_EC_EXCHANGE_REFUND_MERCHANT_SIGNING_FAILED,
     992             :     .hint = gettext_noop ("Merchant backend failed to create the refund confirmation signature."),
     993             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
     994             :   },
     995             : 
     996             :   {
     997             :     .ec = TALER_EC_EXCHANGE_REFUND_INVALID_SIGNATURE_BY_EXCHANGE,
     998             :     .hint = gettext_noop ("The signature returned by the exchange in a refund request was malformed."),
     999             :     .http_code = MHD_HTTP_UNINITIALIZED
    1000             :   },
    1001             : 
    1002             :   {
    1003             :     .ec = TALER_EC_EXCHANGE_REFUND_INVALID_FAILURE_PROOF_BY_EXCHANGE,
    1004             :     .hint = gettext_noop ("The failure proof returned by the exchange is incorrect."),
    1005             :     .http_code = MHD_HTTP_UNINITIALIZED
    1006             :   },
    1007             : 
    1008             :   {
    1009             :     .ec = TALER_EC_EXCHANGE_REFUND_INCONSISTENT_AMOUNT,
    1010             :     .hint = gettext_noop ("Conflicting refund granted before with different amount but same refund transaction ID."),
    1011             :     .http_code = MHD_HTTP_FAILED_DEPENDENCY
    1012             :   },
    1013             : 
    1014             :   {
    1015             :     .ec = TALER_EC_EXCHANGE_RECOUP_SIGNATURE_INVALID,
    1016             :     .hint = gettext_noop ("The given coin signature is invalid for the request."),
    1017             :     .http_code = MHD_HTTP_FORBIDDEN
    1018             :   },
    1019             : 
    1020             :   {
    1021             :     .ec = TALER_EC_EXCHANGE_RECOUP_WITHDRAW_NOT_FOUND,
    1022             :     .hint = gettext_noop ("The exchange could not find the corresponding withdraw operation. The request is denied."),
    1023             :     .http_code = MHD_HTTP_NOT_FOUND
    1024             :   },
    1025             : 
    1026             :   {
    1027             :     .ec = TALER_EC_EXCHANGE_RECOUP_COIN_BALANCE_ZERO,
    1028             :     .hint = gettext_noop ("The coin's remaining balance is zero.  The request is denied."),
    1029             :     .http_code = MHD_HTTP_FORBIDDEN
    1030             :   },
    1031             : 
    1032             :   {
    1033             :     .ec = TALER_EC_EXCHANGE_RECOUP_BLINDING_FAILED,
    1034             :     .hint = gettext_noop ("The exchange failed to reproduce the coin's blinding."),
    1035             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1036             :   },
    1037             : 
    1038             :   {
    1039             :     .ec = TALER_EC_EXCHANGE_RECOUP_COIN_BALANCE_NEGATIVE,
    1040             :     .hint = gettext_noop ("The coin's remaining balance is zero.  The request is denied."),
    1041             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1042             :   },
    1043             : 
    1044             :   {
    1045             :     .ec = TALER_EC_EXCHANGE_RECOUP_NOT_ELIGIBLE,
    1046             :     .hint = gettext_noop ("The coin's denomination has not been revoked yet."),
    1047             :     .http_code = MHD_HTTP_NOT_FOUND
    1048             :   },
    1049             : 
    1050             :   {
    1051             :     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_SIGNATURE_INVALID,
    1052             :     .hint = gettext_noop ("The given coin signature is invalid for the request."),
    1053             :     .http_code = MHD_HTTP_FORBIDDEN
    1054             :   },
    1055             : 
    1056             :   {
    1057             :     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_MELT_NOT_FOUND,
    1058             :     .hint = gettext_noop ("The exchange could not find the corresponding melt operation. The request is denied."),
    1059             :     .http_code = MHD_HTTP_NOT_FOUND
    1060             :   },
    1061             : 
    1062             :   {
    1063             :     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_BLINDING_FAILED,
    1064             :     .hint = gettext_noop ("The exchange failed to reproduce the coin's blinding."),
    1065             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1066             :   },
    1067             : 
    1068             :   {
    1069             :     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_NOT_ELIGIBLE,
    1070             :     .hint = gettext_noop ("The coin's denomination has not been revoked yet."),
    1071             :     .http_code = MHD_HTTP_NOT_FOUND
    1072             :   },
    1073             : 
    1074             :   {
    1075             :     .ec = TALER_EC_EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN,
    1076             :     .hint = gettext_noop ("This exchange does not allow clients to request /keys for times other than the current (exchange) time."),
    1077             :     .http_code = MHD_HTTP_FORBIDDEN
    1078             :   },
    1079             : 
    1080             :   {
    1081             :     .ec = TALER_EC_EXCHANGE_WIRE_SIGNATURE_INVALID,
    1082             :     .hint = gettext_noop ("A signature in the server's response was malformed."),
    1083             :     .http_code = MHD_HTTP_UNINITIALIZED
    1084             :   },
    1085             : 
    1086             :   {
    1087             :     .ec = TALER_EC_EXCHANGE_WIRE_NO_ACCOUNTS_CONFIGURED,
    1088             :     .hint = gettext_noop ("No bank accounts are enabled for the exchange. The administrator should enable-account using the taler-exchange-offline tool."),
    1089             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1090             :   },
    1091             : 
    1092             :   {
    1093             :     .ec = TALER_EC_EXCHANGE_WIRE_INVALID_PAYTO_CONFIGURED,
    1094             :     .hint = gettext_noop ("The payto:// URI stored in the exchange database for its bank account is malformed."),
    1095             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1096             :   },
    1097             : 
    1098             :   {
    1099             :     .ec = TALER_EC_EXCHANGE_WIRE_FEES_NOT_CONFIGURED,
    1100             :     .hint = gettext_noop ("No wire fees are configured for an enabled wire method of the exchange. The administrator must set the wire-fee using the taler-exchange-offline tool."),
    1101             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1102             :   },
    1103             : 
    1104             :   {
    1105             :     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_CREATE_CONFLICTING_META_DATA,
    1106             :     .hint = gettext_noop ("This purse was previously created with different meta data."),
    1107             :     .http_code = MHD_HTTP_CONFLICT
    1108             :   },
    1109             : 
    1110             :   {
    1111             :     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_CONFLICTING_META_DATA,
    1112             :     .hint = gettext_noop ("This purse was previously merged with different meta data."),
    1113             :     .http_code = MHD_HTTP_CONFLICT
    1114             :   },
    1115             : 
    1116             :   {
    1117             :     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_CREATE_INSUFFICIENT_FUNDS,
    1118             :     .hint = gettext_noop ("The reserve has insufficient funds to create another purse."),
    1119             :     .http_code = MHD_HTTP_CONFLICT
    1120             :   },
    1121             : 
    1122             :   {
    1123             :     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_FEE_TOO_LOW,
    1124             :     .hint = gettext_noop ("The purse fee specified for the request is lower than the purse fee charged by the exchange at this time."),
    1125             :     .http_code = MHD_HTTP_BAD_REQUEST
    1126             :   },
    1127             : 
    1128             :   {
    1129             :     .ec = TALER_EC_EXCHANGE_PURSE_DELETE_ALREADY_DECIDED,
    1130             :     .hint = gettext_noop ("The payment request cannot be deleted anymore, as it either already completed or timed out."),
    1131             :     .http_code = MHD_HTTP_CONFLICT
    1132             :   },
    1133             : 
    1134             :   {
    1135             :     .ec = TALER_EC_EXCHANGE_PURSE_DELETE_SIGNATURE_INVALID,
    1136             :     .hint = gettext_noop ("The signature affirming the purse deletion is invalid."),
    1137             :     .http_code = MHD_HTTP_FORBIDDEN
    1138             :   },
    1139             : 
    1140             :   {
    1141             :     .ec = TALER_EC_EXCHANGE_RESERVES_AGE_RESTRICTION_REQUIRED,
    1142             :     .hint = gettext_noop ("Withdrawal from the reserve requires age restriction to be set."),
    1143             :     .http_code = MHD_HTTP_FORBIDDEN
    1144             :   },
    1145             : 
    1146             :   {
    1147             :     .ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_UNAVAILABLE,
    1148             :     .hint = gettext_noop ("The exchange failed to talk to the process responsible for its private denomination keys or the helpers had no denominations (properly) configured."),
    1149             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1150             :   },
    1151             : 
    1152             :   {
    1153             :     .ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG,
    1154             :     .hint = gettext_noop ("The response from the denomination key helper process was malformed."),
    1155             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1156             :   },
    1157             : 
    1158             :   {
    1159             :     .ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_TOO_EARLY,
    1160             :     .hint = gettext_noop ("The helper refuses to sign with the key, because it is too early: the validity period has not yet started."),
    1161             :     .http_code = MHD_HTTP_BAD_REQUEST
    1162             :   },
    1163             : 
    1164             :   {
    1165             :     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_EXCHANGE_SIGNATURE_INVALID,
    1166             :     .hint = gettext_noop ("The signature of the exchange on the reply was invalid."),
    1167             :     .http_code = MHD_HTTP_UNINITIALIZED
    1168             :   },
    1169             : 
    1170             :   {
    1171             :     .ec = TALER_EC_EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE,
    1172             :     .hint = gettext_noop ("The exchange failed to talk to the process responsible for its private signing keys."),
    1173             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1174             :   },
    1175             : 
    1176             :   {
    1177             :     .ec = TALER_EC_EXCHANGE_SIGNKEY_HELPER_BUG,
    1178             :     .hint = gettext_noop ("The response from the online signing key helper process was malformed."),
    1179             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1180             :   },
    1181             : 
    1182             :   {
    1183             :     .ec = TALER_EC_EXCHANGE_SIGNKEY_HELPER_TOO_EARLY,
    1184             :     .hint = gettext_noop ("The helper refuses to sign with the key, because it is too early: the validity period has not yet started."),
    1185             :     .http_code = MHD_HTTP_BAD_REQUEST
    1186             :   },
    1187             : 
    1188             :   {
    1189             :     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_BEFORE_NOW,
    1190             :     .hint = gettext_noop ("The purse expiration time is in the past at the time of its creation."),
    1191             :     .http_code = MHD_HTTP_BAD_REQUEST
    1192             :   },
    1193             : 
    1194             :   {
    1195             :     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_IS_NEVER,
    1196             :     .hint = gettext_noop ("The purse expiration time is set to never, which is not allowed."),
    1197             :     .http_code = MHD_HTTP_BAD_REQUEST
    1198             :   },
    1199             : 
    1200             :   {
    1201             :     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID,
    1202             :     .hint = gettext_noop ("The signature affirming the merge of the purse is invalid."),
    1203             :     .http_code = MHD_HTTP_FORBIDDEN
    1204             :   },
    1205             : 
    1206             :   {
    1207             :     .ec = TALER_EC_EXCHANGE_RESERVES_RESERVE_MERGE_SIGNATURE_INVALID,
    1208             :     .hint = gettext_noop ("The signature by the reserve affirming the merge is invalid."),
    1209             :     .http_code = MHD_HTTP_FORBIDDEN
    1210             :   },
    1211             : 
    1212             :   {
    1213             :     .ec = TALER_EC_EXCHANGE_RESERVES_OPEN_BAD_SIGNATURE,
    1214             :     .hint = gettext_noop ("The signature by the reserve affirming the open operation is invalid."),
    1215             :     .http_code = MHD_HTTP_FORBIDDEN
    1216             :   },
    1217             : 
    1218             :   {
    1219             :     .ec = TALER_EC_EXCHANGE_RESERVES_CLOSE_BAD_SIGNATURE,
    1220             :     .hint = gettext_noop ("The signature by the reserve affirming the close operation is invalid."),
    1221             :     .http_code = MHD_HTTP_FORBIDDEN
    1222             :   },
    1223             : 
    1224             :   {
    1225             :     .ec = TALER_EC_EXCHANGE_RESERVES_ATTEST_BAD_SIGNATURE,
    1226             :     .hint = gettext_noop ("The signature by the reserve affirming the attestion request is invalid."),
    1227             :     .http_code = MHD_HTTP_FORBIDDEN
    1228             :   },
    1229             : 
    1230             :   {
    1231             :     .ec = TALER_EC_EXCHANGE_RESERVES_CLOSE_NO_TARGET_ACCOUNT,
    1232             :     .hint = gettext_noop ("The exchange does not know an origin account to which the remaining reserve balance could be wired to, and the wallet failed to provide one."),
    1233             :     .http_code = MHD_HTTP_CONFLICT
    1234             :   },
    1235             : 
    1236             :   {
    1237             :     .ec = TALER_EC_EXCHANGE_RESERVES_OPEN_INSUFFICIENT_FUNDS,
    1238             :     .hint = gettext_noop ("The reserve balance is insufficient to pay for the open operation."),
    1239             :     .http_code = MHD_HTTP_CONFLICT
    1240             :   },
    1241             : 
    1242             :   {
    1243             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND,
    1244             :     .hint = gettext_noop ("The auditor that was supposed to be disabled is unknown to this exchange."),
    1245             :     .http_code = MHD_HTTP_NOT_FOUND
    1246             :   },
    1247             : 
    1248             :   {
    1249             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_MORE_RECENT_PRESENT,
    1250             :     .hint = gettext_noop ("The exchange has a more recently signed conflicting instruction and is thus refusing the current change (replay detected)."),
    1251             :     .http_code = MHD_HTTP_CONFLICT
    1252             :   },
    1253             : 
    1254             :   {
    1255             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_ADD_SIGNATURE_INVALID,
    1256             :     .hint = gettext_noop ("The signature to add or enable the auditor does not validate."),
    1257             :     .http_code = MHD_HTTP_FORBIDDEN
    1258             :   },
    1259             : 
    1260             :   {
    1261             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_DEL_SIGNATURE_INVALID,
    1262             :     .hint = gettext_noop ("The signature to disable the auditor does not validate."),
    1263             :     .http_code = MHD_HTTP_FORBIDDEN
    1264             :   },
    1265             : 
    1266             :   {
    1267             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_DENOMINATION_REVOKE_SIGNATURE_INVALID,
    1268             :     .hint = gettext_noop ("The signature to revoke the denomination does not validate."),
    1269             :     .http_code = MHD_HTTP_FORBIDDEN
    1270             :   },
    1271             : 
    1272             :   {
    1273             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_SIGNKEY_REVOKE_SIGNATURE_INVALID,
    1274             :     .hint = gettext_noop ("The signature to revoke the online signing key does not validate."),
    1275             :     .http_code = MHD_HTTP_FORBIDDEN
    1276             :   },
    1277             : 
    1278             :   {
    1279             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_MORE_RECENT_PRESENT,
    1280             :     .hint = gettext_noop ("The exchange has a more recently signed conflicting instruction and is thus refusing the current change (replay detected)."),
    1281             :     .http_code = MHD_HTTP_CONFLICT
    1282             :   },
    1283             : 
    1284             :   {
    1285             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_KEYS_SIGNKEY_UNKNOWN,
    1286             :     .hint = gettext_noop ("The signingkey specified is unknown to the exchange."),
    1287             :     .http_code = MHD_HTTP_NOT_FOUND
    1288             :   },
    1289             : 
    1290             :   {
    1291             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_DETAILS_SIGNATURE_INVALID,
    1292             :     .hint = gettext_noop ("The signature to publish wire account does not validate."),
    1293             :     .http_code = MHD_HTTP_FORBIDDEN
    1294             :   },
    1295             : 
    1296             :   {
    1297             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_ADD_SIGNATURE_INVALID,
    1298             :     .hint = gettext_noop ("The signature to add the wire account does not validate."),
    1299             :     .http_code = MHD_HTTP_FORBIDDEN
    1300             :   },
    1301             : 
    1302             :   {
    1303             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_DEL_SIGNATURE_INVALID,
    1304             :     .hint = gettext_noop ("The signature to disable the wire account does not validate."),
    1305             :     .http_code = MHD_HTTP_FORBIDDEN
    1306             :   },
    1307             : 
    1308             :   {
    1309             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_NOT_FOUND,
    1310             :     .hint = gettext_noop ("The wire account to be disabled is unknown to the exchange."),
    1311             :     .http_code = MHD_HTTP_NOT_FOUND
    1312             :   },
    1313             : 
    1314             :   {
    1315             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_FEE_SIGNATURE_INVALID,
    1316             :     .hint = gettext_noop ("The signature to affirm wire fees does not validate."),
    1317             :     .http_code = MHD_HTTP_FORBIDDEN
    1318             :   },
    1319             : 
    1320             :   {
    1321             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_FEE_MISMATCH,
    1322             :     .hint = gettext_noop ("The signature conflicts with a previous signature affirming different fees."),
    1323             :     .http_code = MHD_HTTP_CONFLICT
    1324             :   },
    1325             : 
    1326             :   {
    1327             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_KEYS_DENOMKEY_ADD_SIGNATURE_INVALID,
    1328             :     .hint = gettext_noop ("The signature affirming the denomination key is invalid."),
    1329             :     .http_code = MHD_HTTP_FORBIDDEN
    1330             :   },
    1331             : 
    1332             :   {
    1333             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_KEYS_SIGNKEY_ADD_SIGNATURE_INVALID,
    1334             :     .hint = gettext_noop ("The signature affirming the signing key is invalid."),
    1335             :     .http_code = MHD_HTTP_FORBIDDEN
    1336             :   },
    1337             : 
    1338             :   {
    1339             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_GLOBAL_FEE_MISMATCH,
    1340             :     .hint = gettext_noop ("The signature conflicts with a previous signature affirming different fees."),
    1341             :     .http_code = MHD_HTTP_CONFLICT
    1342             :   },
    1343             : 
    1344             :   {
    1345             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_GLOBAL_FEE_SIGNATURE_INVALID,
    1346             :     .hint = gettext_noop ("The signature affirming the fee structure is invalid."),
    1347             :     .http_code = MHD_HTTP_FORBIDDEN
    1348             :   },
    1349             : 
    1350             :   {
    1351             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_DRAIN_PROFITS_SIGNATURE_INVALID,
    1352             :     .hint = gettext_noop ("The signature affirming the profit drain is invalid."),
    1353             :     .http_code = MHD_HTTP_FORBIDDEN
    1354             :   },
    1355             : 
    1356             :   {
    1357             :     .ec = TALER_EC_EXCHANGE_AML_DECISION_ADD_SIGNATURE_INVALID,
    1358             :     .hint = gettext_noop ("The signature affirming the AML decision is invalid."),
    1359             :     .http_code = MHD_HTTP_FORBIDDEN
    1360             :   },
    1361             : 
    1362             :   {
    1363             :     .ec = TALER_EC_EXCHANGE_AML_DECISION_INVALID_OFFICER,
    1364             :     .hint = gettext_noop ("The AML officer specified is not allowed to make AML decisions right now."),
    1365             :     .http_code = MHD_HTTP_FORBIDDEN
    1366             :   },
    1367             : 
    1368             :   {
    1369             :     .ec = TALER_EC_EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT,
    1370             :     .hint = gettext_noop ("There is a more recent AML decision on file. The decision was rejected as timestamps of AML decisions must be monotonically increasing."),
    1371             :     .http_code = MHD_HTTP_CONFLICT
    1372             :   },
    1373             : 
    1374             :   {
    1375             :     .ec = TALER_EC_EXCHANGE_AML_DECISION_UNKNOWN_CHECK,
    1376             :     .hint = gettext_noop ("There AML decision would impose an AML check of a type that is not provided by any KYC provider known to the exchange."),
    1377             :     .http_code = MHD_HTTP_BAD_REQUEST
    1378             :   },
    1379             : 
    1380             :   {
    1381             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_UPDATE_AML_OFFICER_SIGNATURE_INVALID,
    1382             :     .hint = gettext_noop ("The signature affirming the change in the AML officer status is invalid."),
    1383             :     .http_code = MHD_HTTP_FORBIDDEN
    1384             :   },
    1385             : 
    1386             :   {
    1387             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AML_OFFICERS_MORE_RECENT_PRESENT,
    1388             :     .hint = gettext_noop ("A more recent decision about the AML officer status is known to the exchange."),
    1389             :     .http_code = MHD_HTTP_CONFLICT
    1390             :   },
    1391             : 
    1392             :   {
    1393             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_CONFLICTING_DENOMINATION_META_DATA,
    1394             :     .hint = gettext_noop ("The exchange already has this denomination key configured, but with different meta data. This should not be possible, contact the developers for support."),
    1395             :     .http_code = MHD_HTTP_CONFLICT
    1396             :   },
    1397             : 
    1398             :   {
    1399             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_CONFLICTING_SIGNKEY_META_DATA,
    1400             :     .hint = gettext_noop ("The exchange already has this signing key configured, but with different meta data. This should not be possible, contact the developers for support."),
    1401             :     .http_code = MHD_HTTP_CONFLICT
    1402             :   },
    1403             : 
    1404             :   {
    1405             :     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_CONFLICTING_META_DATA,
    1406             :     .hint = gettext_noop ("The purse was previously created with different meta data."),
    1407             :     .http_code = MHD_HTTP_CONFLICT
    1408             :   },
    1409             : 
    1410             :   {
    1411             :     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_CONFLICTING_CONTRACT_STORED,
    1412             :     .hint = gettext_noop ("The purse was previously created with a different contract."),
    1413             :     .http_code = MHD_HTTP_CONFLICT
    1414             :   },
    1415             : 
    1416             :   {
    1417             :     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_COIN_SIGNATURE_INVALID,
    1418             :     .hint = gettext_noop ("A coin signature for a deposit into the purse is invalid."),
    1419             :     .http_code = MHD_HTTP_FORBIDDEN
    1420             :   },
    1421             : 
    1422             :   {
    1423             :     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXPIRATION_BEFORE_NOW,
    1424             :     .hint = gettext_noop ("The purse expiration time is in the past."),
    1425             :     .http_code = MHD_HTTP_BAD_REQUEST
    1426             :   },
    1427             : 
    1428             :   {
    1429             :     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXPIRATION_IS_NEVER,
    1430             :     .hint = gettext_noop ("The purse expiration time is \"never\"."),
    1431             :     .http_code = MHD_HTTP_BAD_REQUEST
    1432             :   },
    1433             : 
    1434             :   {
    1435             :     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_SIGNATURE_INVALID,
    1436             :     .hint = gettext_noop ("The purse signature over the purse meta data is invalid."),
    1437             :     .http_code = MHD_HTTP_FORBIDDEN
    1438             :   },
    1439             : 
    1440             :   {
    1441             :     .ec = TALER_EC_EXCHANGE_PURSE_ECONTRACT_SIGNATURE_INVALID,
    1442             :     .hint = gettext_noop ("The signature over the encrypted contract is invalid."),
    1443             :     .http_code = MHD_HTTP_FORBIDDEN
    1444             :   },
    1445             : 
    1446             :   {
    1447             :     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXCHANGE_SIGNATURE_INVALID,
    1448             :     .hint = gettext_noop ("The signature from the exchange over the confirmation is invalid."),
    1449             :     .http_code = MHD_HTTP_UNINITIALIZED
    1450             :   },
    1451             : 
    1452             :   {
    1453             :     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_CONFLICTING_META_DATA,
    1454             :     .hint = gettext_noop ("The coin was previously deposited with different meta data."),
    1455             :     .http_code = MHD_HTTP_CONFLICT
    1456             :   },
    1457             : 
    1458             :   {
    1459             :     .ec = TALER_EC_EXCHANGE_PURSE_ECONTRACT_CONFLICTING_META_DATA,
    1460             :     .hint = gettext_noop ("The encrypted contract was previously uploaded with different meta data."),
    1461             :     .http_code = MHD_HTTP_CONFLICT
    1462             :   },
    1463             : 
    1464             :   {
    1465             :     .ec = TALER_EC_EXCHANGE_CREATE_PURSE_NEGATIVE_VALUE_AFTER_FEE,
    1466             :     .hint = gettext_noop ("The deposited amount is less than the purse fee."),
    1467             :     .http_code = MHD_HTTP_BAD_REQUEST
    1468             :   },
    1469             : 
    1470             :   {
    1471             :     .ec = TALER_EC_EXCHANGE_PURSE_MERGE_INVALID_MERGE_SIGNATURE,
    1472             :     .hint = gettext_noop ("The signature using the merge key is invalid."),
    1473             :     .http_code = MHD_HTTP_FORBIDDEN
    1474             :   },
    1475             : 
    1476             :   {
    1477             :     .ec = TALER_EC_EXCHANGE_PURSE_MERGE_INVALID_RESERVE_SIGNATURE,
    1478             :     .hint = gettext_noop ("The signature using the reserve key is invalid."),
    1479             :     .http_code = MHD_HTTP_FORBIDDEN
    1480             :   },
    1481             : 
    1482             :   {
    1483             :     .ec = TALER_EC_EXCHANGE_PURSE_NOT_FULL,
    1484             :     .hint = gettext_noop ("The targeted purse is not yet full and thus cannot be merged. Retrying the request later may succeed."),
    1485             :     .http_code = MHD_HTTP_CONFLICT
    1486             :   },
    1487             : 
    1488             :   {
    1489             :     .ec = TALER_EC_EXCHANGE_PURSE_MERGE_EXCHANGE_SIGNATURE_INVALID,
    1490             :     .hint = gettext_noop ("The signature from the exchange over the confirmation is invalid."),
    1491             :     .http_code = MHD_HTTP_UNINITIALIZED
    1492             :   },
    1493             : 
    1494             :   {
    1495             :     .ec = TALER_EC_EXCHANGE_MERGE_PURSE_PARTNER_UNKNOWN,
    1496             :     .hint = gettext_noop ("The exchange of the target account is not a partner of this exchange."),
    1497             :     .http_code = MHD_HTTP_NOT_FOUND
    1498             :   },
    1499             : 
    1500             :   {
    1501             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_ADD_PARTNER_SIGNATURE_INVALID,
    1502             :     .hint = gettext_noop ("The signature affirming the new partner is invalid."),
    1503             :     .http_code = MHD_HTTP_FORBIDDEN
    1504             :   },
    1505             : 
    1506             :   {
    1507             :     .ec = TALER_EC_EXCHANGE_MANAGEMENT_ADD_PARTNER_DATA_CONFLICT,
    1508             :     .hint = gettext_noop ("Conflicting data for the partner already exists with the exchange."),
    1509             :     .http_code = MHD_HTTP_CONFLICT
    1510             :   },
    1511             : 
    1512             :   {
    1513             :     .ec = TALER_EC_EXCHANGE_AUDITORS_AUDITOR_SIGNATURE_INVALID,
    1514             :     .hint = gettext_noop ("The auditor signature over the denomination meta data is invalid."),
    1515             :     .http_code = MHD_HTTP_FORBIDDEN
    1516             :   },
    1517             : 
    1518             :   {
    1519             :     .ec = TALER_EC_EXCHANGE_AUDITORS_AUDITOR_UNKNOWN,
    1520             :     .hint = gettext_noop ("The auditor that was specified is unknown to this exchange."),
    1521             :     .http_code = MHD_HTTP_PRECONDITION_FAILED
    1522             :   },
    1523             : 
    1524             :   {
    1525             :     .ec = TALER_EC_EXCHANGE_AUDITORS_AUDITOR_INACTIVE,
    1526             :     .hint = gettext_noop ("The auditor that was specified is no longer used by this exchange."),
    1527             :     .http_code = MHD_HTTP_GONE
    1528             :   },
    1529             : 
    1530             :   {
    1531             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_AML_PROGRAM_TIMEOUT,
    1532             :     .hint = gettext_noop ("The exchange tried to run an AML program, but that program did not terminate on time. Contact the exchange operator to address the AML program bug or performance issue. If it is not a performance issue, the timeout might have to be increased (requires changes to the source code)."),
    1533             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1534             :   },
    1535             : 
    1536             :   {
    1537             :     .ec = TALER_EC_EXCHANGE_KYC_INFO_AUTHORIZATION_FAILED,
    1538             :     .hint = gettext_noop ("The KYC info access token is not recognized. Hence the request was denied."),
    1539             :     .http_code = MHD_HTTP_FORBIDDEN
    1540             :   },
    1541             : 
    1542             :   {
    1543             :     .ec = TALER_EC_EXCHANGE_KYC_RECURSIVE_RULE_DETECTED,
    1544             :     .hint = gettext_noop ("The exchange got stuck in a long series of (likely recursive) KYC rules without user-inputs that did not result in a timely conclusion. This is a configuration failure. Please contact the administrator."),
    1545             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1546             :   },
    1547             : 
    1548             :   {
    1549             :     .ec = TALER_EC_EXCHANGE_KYC_AML_FORM_INCOMPLETE,
    1550             :     .hint = gettext_noop ("The submitted KYC data lacks an attribute that is required by the KYC form. Please submit the complete form."),
    1551             :     .http_code = MHD_HTTP_BAD_REQUEST
    1552             :   },
    1553             : 
    1554             :   {
    1555             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_AML_PROGRAM_GONE,
    1556             :     .hint = gettext_noop ("The request requires an AML program which is no longer configured at the exchange. Contact the exchange operator to address the configuration issue."),
    1557             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1558             :   },
    1559             : 
    1560             :   {
    1561             :     .ec = TALER_EC_EXCHANGE_KYC_NOT_A_FORM,
    1562             :     .hint = gettext_noop ("The given check is not of type 'form' and thus using this handler for form submission is incorrect."),
    1563             :     .http_code = MHD_HTTP_BAD_REQUEST
    1564             :   },
    1565             : 
    1566             :   {
    1567             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_CHECK_GONE,
    1568             :     .hint = gettext_noop ("The request requires a check which is no longer configured at the exchange. Contact the exchange operator to address the configuration issue."),
    1569             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1570             :   },
    1571             : 
    1572             :   {
    1573             :     .ec = TALER_EC_EXCHANGE_KYC_WALLET_SIGNATURE_INVALID,
    1574             :     .hint = gettext_noop ("The signature affirming the wallet's KYC request was invalid."),
    1575             :     .http_code = MHD_HTTP_FORBIDDEN
    1576             :   },
    1577             : 
    1578             :   {
    1579             :     .ec = TALER_EC_EXCHANGE_KYC_PROOF_BACKEND_INVALID_RESPONSE,
    1580             :     .hint = gettext_noop ("The exchange received an unexpected malformed response from its KYC backend."),
    1581             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1582             :   },
    1583             : 
    1584             :   {
    1585             :     .ec = TALER_EC_EXCHANGE_KYC_PROOF_BACKEND_ERROR,
    1586             :     .hint = gettext_noop ("The backend signaled an unexpected failure."),
    1587             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1588             :   },
    1589             : 
    1590             :   {
    1591             :     .ec = TALER_EC_EXCHANGE_KYC_PROOF_BACKEND_AUTHORIZATION_FAILED,
    1592             :     .hint = gettext_noop ("The backend signaled an authorization failure."),
    1593             :     .http_code = MHD_HTTP_FORBIDDEN
    1594             :   },
    1595             : 
    1596             :   {
    1597             :     .ec = TALER_EC_EXCHANGE_KYC_PROOF_REQUEST_UNKNOWN,
    1598             :     .hint = gettext_noop ("The exchange is unaware of having made an the authorization request."),
    1599             :     .http_code = MHD_HTTP_NOT_FOUND
    1600             :   },
    1601             : 
    1602             :   {
    1603             :     .ec = TALER_EC_EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED,
    1604             :     .hint = gettext_noop ("The KYC authorization signature was invalid. Hence the request was denied."),
    1605             :     .http_code = MHD_HTTP_FORBIDDEN
    1606             :   },
    1607             : 
    1608             :   {
    1609             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_UNKNOWN,
    1610             :     .hint = gettext_noop ("The request used a logic specifier that is not known to the exchange."),
    1611             :     .http_code = MHD_HTTP_NOT_FOUND
    1612             :   },
    1613             : 
    1614             :   {
    1615             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_GONE,
    1616             :     .hint = gettext_noop ("The request requires a logic which is no longer configured at the exchange."),
    1617             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1618             :   },
    1619             : 
    1620             :   {
    1621             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_BUG,
    1622             :     .hint = gettext_noop ("The logic plugin had a bug in its interaction with the KYC provider."),
    1623             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1624             :   },
    1625             : 
    1626             :   {
    1627             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_ACCESS_REFUSED,
    1628             :     .hint = gettext_noop ("The exchange could not process the request with its KYC provider because the provider refused access to the service. This indicates some configuration issue at the Taler exchange operator."),
    1629             :     .http_code = MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED
    1630             :   },
    1631             : 
    1632             :   {
    1633             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_TIMEOUT,
    1634             :     .hint = gettext_noop ("There was a timeout in the interaction between the exchange and the KYC provider. The most likely cause is some networking problem. Trying again later might succeed."),
    1635             :     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
    1636             :   },
    1637             : 
    1638             :   {
    1639             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_UNEXPECTED_REPLY,
    1640             :     .hint = gettext_noop ("The KYC provider responded with a status that was completely unexpected by the KYC logic of the exchange."),
    1641             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1642             :   },
    1643             : 
    1644             :   {
    1645             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_RATE_LIMIT_EXCEEDED,
    1646             :     .hint = gettext_noop ("The rate limit of the exchange at the KYC provider has been exceeded. Trying much later might work."),
    1647             :     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
    1648             :   },
    1649             : 
    1650             :   {
    1651             :     .ec = TALER_EC_EXCHANGE_KYC_WEBHOOK_UNAUTHORIZED,
    1652             :     .hint = gettext_noop ("The request to the webhook lacked proper authorization or authentication data."),
    1653             :     .http_code = MHD_HTTP_UNAUTHORIZED
    1654             :   },
    1655             : 
    1656             :   {
    1657             :     .ec = TALER_EC_EXCHANGE_KYC_CHECK_REQUEST_UNKNOWN,
    1658             :     .hint = gettext_noop ("The exchange is unaware of the requested payto URI with respect to the KYC status."),
    1659             :     .http_code = MHD_HTTP_NOT_FOUND
    1660             :   },
    1661             : 
    1662             :   {
    1663             :     .ec = TALER_EC_EXCHANGE_KYC_CHECK_AUTHORIZATION_KEY_UNKNOWN,
    1664             :     .hint = gettext_noop ("The exchange has no account public key to check the KYC authorization signature against. Hence the request was denied. The user should do a wire transfer to the exchange with the KYC authorization key in the subject."),
    1665             :     .http_code = MHD_HTTP_CONFLICT
    1666             :   },
    1667             : 
    1668             :   {
    1669             :     .ec = TALER_EC_EXCHANGE_KYC_FORM_ALREADY_UPLOADED,
    1670             :     .hint = gettext_noop ("The form has been previously uploaded, and may only be filed once. The user should be redirected to their main KYC page and see if any other steps need to be taken."),
    1671             :     .http_code = MHD_HTTP_CONFLICT
    1672             :   },
    1673             : 
    1674             :   {
    1675             :     .ec = TALER_EC_EXCHANGE_KYC_MEASURES_MALFORMED,
    1676             :     .hint = gettext_noop ("The internal state of the exchange specifying KYC measures is malformed. Please contact technical support."),
    1677             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1678             :   },
    1679             : 
    1680             :   {
    1681             :     .ec = TALER_EC_EXCHANGE_KYC_MEASURE_INDEX_INVALID,
    1682             :     .hint = gettext_noop ("The specified index does not refer to a valid KYC measure. Please check the URL."),
    1683             :     .http_code = MHD_HTTP_NOT_FOUND
    1684             :   },
    1685             : 
    1686             :   {
    1687             :     .ec = TALER_EC_EXCHANGE_KYC_INVALID_LOGIC_TO_CHECK,
    1688             :     .hint = gettext_noop ("The operation is not supported by the selected KYC logic. This is either caused by a configuration change or some invalid use of the API. Please contact technical support."),
    1689             :     .http_code = MHD_HTTP_CONFLICT
    1690             :   },
    1691             : 
    1692             :   {
    1693             :     .ec = TALER_EC_EXCHANGE_KYC_AML_PROGRAM_FAILURE,
    1694             :     .hint = gettext_noop ("The AML program failed. This is either caused by a configuration change or a bug. Please contact technical support."),
    1695             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1696             :   },
    1697             : 
    1698             :   {
    1699             :     .ec = TALER_EC_EXCHANGE_KYC_AML_PROGRAM_MALFORMED_RESULT,
    1700             :     .hint = gettext_noop ("The AML program returned a malformed result. This is a bug. Please contact technical support."),
    1701             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1702             :   },
    1703             : 
    1704             :   {
    1705             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_INCOMPLETE_REPLY,
    1706             :     .hint = gettext_noop ("The response from the KYC provider lacked required attributes. Please contact technical support."),
    1707             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1708             :   },
    1709             : 
    1710             :   {
    1711             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_INCOMPLETE_CONTEXT,
    1712             :     .hint = gettext_noop ("The context of the KYC check lacked required fields. This is a bug. Please contact technical support."),
    1713             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1714             :   },
    1715             : 
    1716             :   {
    1717             :     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_AML_LOGIC_BUG,
    1718             :     .hint = gettext_noop ("The logic plugin had a bug in its AML processing. This is a bug. Please contact technical support."),
    1719             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1720             :   },
    1721             : 
    1722             :   {
    1723             :     .ec = TALER_EC_EXCHANGE_CONTRACTS_UNKNOWN,
    1724             :     .hint = gettext_noop ("The exchange does not know a contract under the given contract public key."),
    1725             :     .http_code = MHD_HTTP_NOT_FOUND
    1726             :   },
    1727             : 
    1728             :   {
    1729             :     .ec = TALER_EC_EXCHANGE_CONTRACTS_INVALID_CONTRACT_PUB,
    1730             :     .hint = gettext_noop ("The URL does not encode a valid exchange public key in its path."),
    1731             :     .http_code = MHD_HTTP_BAD_REQUEST
    1732             :   },
    1733             : 
    1734             :   {
    1735             :     .ec = TALER_EC_EXCHANGE_CONTRACTS_DECRYPTION_FAILED,
    1736             :     .hint = gettext_noop ("The returned encrypted contract did not decrypt."),
    1737             :     .http_code = MHD_HTTP_UNINITIALIZED
    1738             :   },
    1739             : 
    1740             :   {
    1741             :     .ec = TALER_EC_EXCHANGE_CONTRACTS_SIGNATURE_INVALID,
    1742             :     .hint = gettext_noop ("The signature on the encrypted contract did not validate."),
    1743             :     .http_code = MHD_HTTP_UNINITIALIZED
    1744             :   },
    1745             : 
    1746             :   {
    1747             :     .ec = TALER_EC_EXCHANGE_CONTRACTS_DECODING_FAILED,
    1748             :     .hint = gettext_noop ("The decrypted contract was malformed."),
    1749             :     .http_code = MHD_HTTP_UNINITIALIZED
    1750             :   },
    1751             : 
    1752             :   {
    1753             :     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_SIGNATURE_INVALID,
    1754             :     .hint = gettext_noop ("A coin signature for a deposit into the purse is invalid."),
    1755             :     .http_code = MHD_HTTP_FORBIDDEN
    1756             :   },
    1757             : 
    1758             :   {
    1759             :     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_DECIDED_ALREADY,
    1760             :     .hint = gettext_noop ("It is too late to deposit coins into the purse."),
    1761             :     .http_code = MHD_HTTP_GONE
    1762             :   },
    1763             : 
    1764             :   {
    1765             :     .ec = TALER_EC_EXCHANGE_KYC_INFO_BUSY,
    1766             :     .hint = gettext_noop ("The exchange is currently processing the KYC status and is not able to return a response yet."),
    1767             :     .http_code = MHD_HTTP_ACCEPTED
    1768             :   },
    1769             : 
    1770             :   {
    1771             :     .ec = TALER_EC_EXCHANGE_TOTP_KEY_INVALID,
    1772             :     .hint = gettext_noop ("TOTP key is not valid."),
    1773             :     .http_code = MHD_HTTP_UNINITIALIZED
    1774             :   },
    1775             : 
    1776             :   {
    1777             :     .ec = TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN,
    1778             :     .hint = gettext_noop ("The backend could not find the merchant instance specified in the request."),
    1779             :     .http_code = MHD_HTTP_NOT_FOUND
    1780             :   },
    1781             : 
    1782             :   {
    1783             :     .ec = TALER_EC_MERCHANT_GENERIC_HOLE_IN_WIRE_FEE_STRUCTURE,
    1784             :     .hint = gettext_noop ("The start and end-times in the wire fee structure leave a hole. This is not allowed."),
    1785             :     .http_code = MHD_HTTP_UNINITIALIZED
    1786             :   },
    1787             : 
    1788             :   {
    1789             :     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_WIRE_REQUEST_FAILED,
    1790             :     .hint = gettext_noop ("The merchant was unable to obtain a valid answer to /wire from the exchange."),
    1791             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1792             :   },
    1793             : 
    1794             :   {
    1795             :     .ec = TALER_EC_MERCHANT_GENERIC_CATEGORY_UNKNOWN,
    1796             :     .hint = gettext_noop ("The product category is not known to the backend."),
    1797             :     .http_code = MHD_HTTP_NOT_FOUND
    1798             :   },
    1799             : 
    1800             :   {
    1801             :     .ec = TALER_EC_MERCHANT_GENERIC_ORDER_UNKNOWN,
    1802             :     .hint = gettext_noop ("The proposal is not known to the backend."),
    1803             :     .http_code = MHD_HTTP_NOT_FOUND
    1804             :   },
    1805             : 
    1806             :   {
    1807             :     .ec = TALER_EC_MERCHANT_GENERIC_PRODUCT_UNKNOWN,
    1808             :     .hint = gettext_noop ("The order provided to the backend could not be completed, because a product to be completed via inventory data is not actually in our inventory."),
    1809             :     .http_code = MHD_HTTP_NOT_FOUND
    1810             :   },
    1811             : 
    1812             :   {
    1813             :     .ec = TALER_EC_MERCHANT_GENERIC_REWARD_ID_UNKNOWN,
    1814             :     .hint = gettext_noop ("The reward ID is unknown.  This could happen if the reward has expired."),
    1815             :     .http_code = MHD_HTTP_NOT_FOUND
    1816             :   },
    1817             : 
    1818             :   {
    1819             :     .ec = TALER_EC_MERCHANT_GENERIC_DB_CONTRACT_CONTENT_INVALID,
    1820             :     .hint = gettext_noop ("The contract obtained from the merchant backend was malformed."),
    1821             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1822             :   },
    1823             : 
    1824             :   {
    1825             :     .ec = TALER_EC_MERCHANT_GENERIC_CONTRACT_HASH_DOES_NOT_MATCH_ORDER,
    1826             :     .hint = gettext_noop ("The order we found does not match the provided contract hash."),
    1827             :     .http_code = MHD_HTTP_FORBIDDEN
    1828             :   },
    1829             : 
    1830             :   {
    1831             :     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_KEYS_FAILURE,
    1832             :     .hint = gettext_noop ("The exchange failed to provide a valid response to the merchant's /keys request."),
    1833             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1834             :   },
    1835             : 
    1836             :   {
    1837             :     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_TIMEOUT,
    1838             :     .hint = gettext_noop ("The exchange failed to respond to the merchant on time."),
    1839             :     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
    1840             :   },
    1841             : 
    1842             :   {
    1843             :     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_CONNECT_FAILURE,
    1844             :     .hint = gettext_noop ("The merchant failed to talk to the exchange."),
    1845             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1846             :   },
    1847             : 
    1848             :   {
    1849             :     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_REPLY_MALFORMED,
    1850             :     .hint = gettext_noop ("The exchange returned a maformed response."),
    1851             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1852             :   },
    1853             : 
    1854             :   {
    1855             :     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_UNEXPECTED_STATUS,
    1856             :     .hint = gettext_noop ("The exchange returned an unexpected response status."),
    1857             :     .http_code = MHD_HTTP_BAD_GATEWAY
    1858             :   },
    1859             : 
    1860             :   {
    1861             :     .ec = TALER_EC_MERCHANT_GENERIC_UNAUTHORIZED,
    1862             :     .hint = gettext_noop ("The merchant refused the request due to lack of authorization."),
    1863             :     .http_code = MHD_HTTP_UNAUTHORIZED
    1864             :   },
    1865             : 
    1866             :   {
    1867             :     .ec = TALER_EC_MERCHANT_GENERIC_INSTANCE_DELETED,
    1868             :     .hint = gettext_noop ("The merchant instance specified in the request was deleted."),
    1869             :     .http_code = MHD_HTTP_NOT_FOUND
    1870             :   },
    1871             : 
    1872             :   {
    1873             :     .ec = TALER_EC_MERCHANT_GENERIC_TRANSFER_UNKNOWN,
    1874             :     .hint = gettext_noop ("The backend could not find the inbound wire transfer specified in the request."),
    1875             :     .http_code = MHD_HTTP_NOT_FOUND
    1876             :   },
    1877             : 
    1878             :   {
    1879             :     .ec = TALER_EC_MERCHANT_GENERIC_TEMPLATE_UNKNOWN,
    1880             :     .hint = gettext_noop ("The backend could not find the template(id) because it is not exist."),
    1881             :     .http_code = MHD_HTTP_NOT_FOUND
    1882             :   },
    1883             : 
    1884             :   {
    1885             :     .ec = TALER_EC_MERCHANT_GENERIC_WEBHOOK_UNKNOWN,
    1886             :     .hint = gettext_noop ("The backend could not find the webhook(id) because it is not exist."),
    1887             :     .http_code = MHD_HTTP_NOT_FOUND
    1888             :   },
    1889             : 
    1890             :   {
    1891             :     .ec = TALER_EC_MERCHANT_GENERIC_PENDING_WEBHOOK_UNKNOWN,
    1892             :     .hint = gettext_noop ("The backend could not find the webhook(serial) because it is not exist."),
    1893             :     .http_code = MHD_HTTP_NOT_FOUND
    1894             :   },
    1895             : 
    1896             :   {
    1897             :     .ec = TALER_EC_MERCHANT_GENERIC_OTP_DEVICE_UNKNOWN,
    1898             :     .hint = gettext_noop ("The backend could not find the OTP device(id) because it is not exist."),
    1899             :     .http_code = MHD_HTTP_NOT_FOUND
    1900             :   },
    1901             : 
    1902             :   {
    1903             :     .ec = TALER_EC_MERCHANT_GENERIC_ACCOUNT_UNKNOWN,
    1904             :     .hint = gettext_noop ("The account is not known to the backend."),
    1905             :     .http_code = MHD_HTTP_NOT_FOUND
    1906             :   },
    1907             : 
    1908             :   {
    1909             :     .ec = TALER_EC_MERCHANT_GENERIC_H_WIRE_MALFORMED,
    1910             :     .hint = gettext_noop ("The wire hash was malformed."),
    1911             :     .http_code = MHD_HTTP_BAD_REQUEST
    1912             :   },
    1913             : 
    1914             :   {
    1915             :     .ec = TALER_EC_MERCHANT_GENERIC_CURRENCY_MISMATCH,
    1916             :     .hint = gettext_noop ("The currency specified in the operation does not work with the current state of the given resource."),
    1917             :     .http_code = MHD_HTTP_CONFLICT
    1918             :   },
    1919             : 
    1920             :   {
    1921             :     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_UNTRUSTED,
    1922             :     .hint = gettext_noop ("The exchange specified in the operation is not trusted by this exchange. The client should limit its operation to exchanges enabled by the merchant, or ask the merchant to enable additional exchanges in the configuration."),
    1923             :     .http_code = MHD_HTTP_BAD_REQUEST
    1924             :   },
    1925             : 
    1926             :   {
    1927             :     .ec = TALER_EC_MERCHANT_GENERIC_TOKEN_FAMILY_UNKNOWN,
    1928             :     .hint = gettext_noop ("The token family is not known to the backend."),
    1929             :     .http_code = MHD_HTTP_NOT_FOUND
    1930             :   },
    1931             : 
    1932             :   {
    1933             :     .ec = TALER_EC_MERCHANT_GENERIC_TOKEN_KEY_UNKNOWN,
    1934             :     .hint = gettext_noop ("The token family key is not known to the backend. Check the local system time on the client, maybe an expired (or not yet valid) token was used."),
    1935             :     .http_code = MHD_HTTP_NOT_FOUND
    1936             :   },
    1937             : 
    1938             :   {
    1939             :     .ec = TALER_EC_MERCHANT_GENERIC_DONAU_NOT_CONFIGURED,
    1940             :     .hint = gettext_noop ("The merchant backend is not configured to support the DONAU protocol."),
    1941             :     .http_code = MHD_HTTP_NOT_IMPLEMENTED
    1942             :   },
    1943             : 
    1944             :   {
    1945             :     .ec = TALER_EC_MERCHANT_GET_ORDERS_EXCHANGE_TRACKING_FAILURE,
    1946             :     .hint = gettext_noop ("The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response."),
    1947             :     .http_code = MHD_HTTP_OK
    1948             :   },
    1949             : 
    1950             :   {
    1951             :     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_EXCHANGE_REQUEST_FAILURE,
    1952             :     .hint = gettext_noop ("The merchant backend failed to construct the request for tracking to the exchange, thus tracking details are not in the response."),
    1953             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1954             :   },
    1955             : 
    1956             :   {
    1957             :     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_EXCHANGE_LOOKUP_START_FAILURE,
    1958             :     .hint = gettext_noop ("The merchant backend failed trying to contact the exchange for tracking details, thus those details are not in the response."),
    1959             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    1960             :   },
    1961             : 
    1962             :   {
    1963             :     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_INVALID_TOKEN,
    1964             :     .hint = gettext_noop ("The claim token used to authenticate the client is invalid for this order."),
    1965             :     .http_code = MHD_HTTP_FORBIDDEN
    1966             :   },
    1967             : 
    1968             :   {
    1969             :     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_INVALID_CONTRACT_HASH,
    1970             :     .hint = gettext_noop ("The contract terms hash used to authenticate the client is invalid for this order."),
    1971             :     .http_code = MHD_HTTP_FORBIDDEN
    1972             :   },
    1973             : 
    1974             :   {
    1975             :     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_INVALID_CONTRACT_VERSION,
    1976             :     .hint = gettext_noop ("The contract terms version is not invalid."),
    1977             :     .http_code = MHD_HTTP_FORBIDDEN
    1978             :   },
    1979             : 
    1980             :   {
    1981             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_FUNDS,
    1982             :     .hint = gettext_noop ("The exchange responded saying that funds were insufficient (for example, due to double-spending)."),
    1983             :     .http_code = MHD_HTTP_CONFLICT
    1984             :   },
    1985             : 
    1986             :   {
    1987             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND,
    1988             :     .hint = gettext_noop ("The denomination key used for payment is not listed among the denomination keys of the exchange."),
    1989             :     .http_code = MHD_HTTP_BAD_REQUEST
    1990             :   },
    1991             : 
    1992             :   {
    1993             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_AUDITOR_FAILURE,
    1994             :     .hint = gettext_noop ("The denomination key used for payment is not audited by an auditor approved by the merchant."),
    1995             :     .http_code = MHD_HTTP_BAD_REQUEST
    1996             :   },
    1997             : 
    1998             :   {
    1999             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AMOUNT_OVERFLOW,
    2000             :     .hint = gettext_noop ("There was an integer overflow totaling up the amounts or deposit fees in the payment."),
    2001             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2002             :   },
    2003             : 
    2004             :   {
    2005             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_FEES_EXCEED_PAYMENT,
    2006             :     .hint = gettext_noop ("The deposit fees exceed the total value of the payment."),
    2007             :     .http_code = MHD_HTTP_BAD_REQUEST
    2008             :   },
    2009             : 
    2010             :   {
    2011             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_DUE_TO_FEES,
    2012             :     .hint = gettext_noop ("After considering deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract.  The client should revisit the logic used to calculate fees it must cover."),
    2013             :     .http_code = MHD_HTTP_BAD_REQUEST
    2014             :   },
    2015             : 
    2016             :   {
    2017             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_PAYMENT_INSUFFICIENT,
    2018             :     .hint = gettext_noop ("Even if we do not consider deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract."),
    2019             :     .http_code = MHD_HTTP_BAD_REQUEST
    2020             :   },
    2021             : 
    2022             :   {
    2023             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_COIN_SIGNATURE_INVALID,
    2024             :     .hint = gettext_noop ("The signature over the contract of one of the coins was invalid."),
    2025             :     .http_code = MHD_HTTP_FORBIDDEN
    2026             :   },
    2027             : 
    2028             :   {
    2029             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_LOOKUP_FAILED,
    2030             :     .hint = gettext_noop ("When we tried to find information about the exchange to issue the deposit, we failed.  This usually only happens if the merchant backend is somehow unable to get its own HTTP client logic to work."),
    2031             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2032             :   },
    2033             : 
    2034             :   {
    2035             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_REFUND_DEADLINE_PAST_WIRE_TRANSFER_DEADLINE,
    2036             :     .hint = gettext_noop ("The refund deadline in the contract is after the transfer deadline."),
    2037             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2038             :   },
    2039             : 
    2040             :   {
    2041             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_ALREADY_PAID,
    2042             :     .hint = gettext_noop ("The order was already paid (maybe by another wallet)."),
    2043             :     .http_code = MHD_HTTP_CONFLICT
    2044             :   },
    2045             : 
    2046             :   {
    2047             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_OFFER_EXPIRED,
    2048             :     .hint = gettext_noop ("The payment is too late, the offer has expired."),
    2049             :     .http_code = MHD_HTTP_GONE
    2050             :   },
    2051             : 
    2052             :   {
    2053             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_MERCHANT_FIELD_MISSING,
    2054             :     .hint = gettext_noop ("The \"merchant\" field is missing in the proposal data. This is an internal error as the proposal is from the merchant's own database at this point."),
    2055             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2056             :   },
    2057             : 
    2058             :   {
    2059             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_WIRE_HASH_UNKNOWN,
    2060             :     .hint = gettext_noop ("Failed to locate merchant's account information matching the wire hash given in the proposal."),
    2061             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2062             :   },
    2063             : 
    2064             :   {
    2065             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_DEPOSIT_EXPIRED,
    2066             :     .hint = gettext_noop ("The deposit time for the denomination has expired."),
    2067             :     .http_code = MHD_HTTP_GONE
    2068             :   },
    2069             : 
    2070             :   {
    2071             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_WIRE_FEE_ADDITION_FAILED,
    2072             :     .hint = gettext_noop ("The exchange of the deposited coin charges a wire fee that could not be added to the total (total amount too high)."),
    2073             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2074             :   },
    2075             : 
    2076             :   {
    2077             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_REFUNDED,
    2078             :     .hint = gettext_noop ("The contract was not fully paid because of refunds. Note that clients MAY treat this as paid if, for example, contracts must be executed despite of refunds."),
    2079             :     .http_code = MHD_HTTP_PAYMENT_REQUIRED
    2080             :   },
    2081             : 
    2082             :   {
    2083             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_REFUNDS_EXCEED_PAYMENTS,
    2084             :     .hint = gettext_noop ("According to our database, we have refunded more than we were paid (which should not be possible)."),
    2085             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2086             :   },
    2087             : 
    2088             :   {
    2089             :     .ec = TALER_EC_DEAD_QQQ_PAY_MERCHANT_POST_ORDERS_ID_ABORT_REFUND_REFUSED_PAYMENT_COMPLETE,
    2090             :     .hint = gettext_noop ("Legacy stuff. Remove me with protocol v1."),
    2091             :     .http_code = MHD_HTTP_UNINITIALIZED
    2092             :   },
    2093             : 
    2094             :   {
    2095             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_FAILED,
    2096             :     .hint = gettext_noop ("The payment failed at the exchange."),
    2097             :     .http_code = MHD_HTTP_BAD_GATEWAY
    2098             :   },
    2099             : 
    2100             :   {
    2101             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_MISSING,
    2102             :     .hint = gettext_noop ("The payment required a minimum age but one of the coins (of a denomination with support for age restriction) did not provide any age_commitment."),
    2103             :     .http_code = MHD_HTTP_BAD_REQUEST
    2104             :   },
    2105             : 
    2106             :   {
    2107             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_SIZE_MISMATCH,
    2108             :     .hint = gettext_noop ("The payment required a minimum age but one of the coins provided an age_commitment that contained a wrong number of public keys compared to the number of age groups defined in the denomination of the coin."),
    2109             :     .http_code = MHD_HTTP_BAD_REQUEST
    2110             :   },
    2111             : 
    2112             :   {
    2113             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_VERIFICATION_FAILED,
    2114             :     .hint = gettext_noop ("The payment required a minimum age but one of the coins provided a minimum_age_sig that couldn't be verified with the given age_commitment for that particular minimum age."),
    2115             :     .http_code = MHD_HTTP_BAD_REQUEST
    2116             :   },
    2117             : 
    2118             :   {
    2119             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_HASH_MISSING,
    2120             :     .hint = gettext_noop ("The payment required no minimum age but one of the coins (of a denomination with support for age restriction) did not provide the required h_age_commitment."),
    2121             :     .http_code = MHD_HTTP_BAD_REQUEST
    2122             :   },
    2123             : 
    2124             :   {
    2125             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_WIRE_METHOD_UNSUPPORTED,
    2126             :     .hint = gettext_noop ("The exchange does not support the selected bank account of the merchant. Likely the merchant had stale data on the bank accounts of the exchange and thus selected an inappropriate exchange when making the offer."),
    2127             :     .http_code = MHD_HTTP_CONFLICT
    2128             :   },
    2129             : 
    2130             :   {
    2131             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_CHOICE_INDEX_MISSING,
    2132             :     .hint = gettext_noop ("The payment requires the wallet to select a choice from the choices array and pass it in the 'choice_index' field of the request."),
    2133             :     .http_code = MHD_HTTP_BAD_REQUEST
    2134             :   },
    2135             : 
    2136             :   {
    2137             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_CHOICE_INDEX_OUT_OF_BOUNDS,
    2138             :     .hint = gettext_noop ("The 'choice_index' field is invalid."),
    2139             :     .http_code = MHD_HTTP_BAD_REQUEST
    2140             :   },
    2141             : 
    2142             :   {
    2143             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_INPUT_TOKENS_MISMATCH,
    2144             :     .hint = gettext_noop ("The provided 'tokens' array does not match with the required input tokens of the order."),
    2145             :     .http_code = MHD_HTTP_BAD_REQUEST
    2146             :   },
    2147             : 
    2148             :   {
    2149             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_ISSUE_SIG_INVALID,
    2150             :     .hint = gettext_noop ("Invalid token issue signature (blindly signed by merchant) for provided token."),
    2151             :     .http_code = MHD_HTTP_BAD_REQUEST
    2152             :   },
    2153             : 
    2154             :   {
    2155             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_USE_SIG_INVALID,
    2156             :     .hint = gettext_noop ("Invalid token use signature (EdDSA, signed by wallet) for provided token."),
    2157             :     .http_code = MHD_HTTP_BAD_REQUEST
    2158             :   },
    2159             : 
    2160             :   {
    2161             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_COUNT_MISMATCH,
    2162             :     .hint = gettext_noop ("The provided number of tokens does not match the required number."),
    2163             :     .http_code = MHD_HTTP_BAD_REQUEST
    2164             :   },
    2165             : 
    2166             :   {
    2167             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_ENVELOPE_COUNT_MISMATCH,
    2168             :     .hint = gettext_noop ("The provided number of token envelopes does not match the specified number."),
    2169             :     .http_code = MHD_HTTP_BAD_REQUEST
    2170             :   },
    2171             : 
    2172             :   {
    2173             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_INVALID,
    2174             :     .hint = gettext_noop ("Invalid token because it was already used, is expired or not yet valid."),
    2175             :     .http_code = MHD_HTTP_CONFLICT
    2176             :   },
    2177             : 
    2178             :   {
    2179             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_TRANSACTION_LIMIT_VIOLATION,
    2180             :     .hint = gettext_noop ("The payment violates a transaction limit configured at the given exchange. The wallet has a bug in that it failed to check exchange limits during coin selection. Please report the bug to your wallet developer."),
    2181             :     .http_code = MHD_HTTP_BAD_REQUEST
    2182             :   },
    2183             : 
    2184             :   {
    2185             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH,
    2186             :     .hint = gettext_noop ("The contract hash does not match the given order ID."),
    2187             :     .http_code = MHD_HTTP_BAD_REQUEST
    2188             :   },
    2189             : 
    2190             :   {
    2191             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAID_COIN_SIGNATURE_INVALID,
    2192             :     .hint = gettext_noop ("The signature of the merchant is not valid for the given contract hash."),
    2193             :     .http_code = MHD_HTTP_FORBIDDEN
    2194             :   },
    2195             : 
    2196             :   {
    2197             :     .ec = TALER_EC_MERCHANT_POST_TOKEN_FAMILY_CONFLICT,
    2198             :     .hint = gettext_noop ("A token family with this ID but conflicting data exists."),
    2199             :     .http_code = MHD_HTTP_CONFLICT
    2200             :   },
    2201             : 
    2202             :   {
    2203             :     .ec = TALER_EC_MERCHANT_PATCH_TOKEN_FAMILY_NOT_FOUND,
    2204             :     .hint = gettext_noop ("The backend is unaware of a token family with the given ID."),
    2205             :     .http_code = MHD_HTTP_NOT_FOUND
    2206             :   },
    2207             : 
    2208             :   {
    2209             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_REFUND_FAILED,
    2210             :     .hint = gettext_noop ("The merchant failed to send the exchange the refund request."),
    2211             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2212             :   },
    2213             : 
    2214             :   {
    2215             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_LOOKUP_FAILED,
    2216             :     .hint = gettext_noop ("The merchant failed to find the exchange to process the lookup."),
    2217             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2218             :   },
    2219             : 
    2220             :   {
    2221             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_CONTRACT_NOT_FOUND,
    2222             :     .hint = gettext_noop ("The merchant could not find the contract."),
    2223             :     .http_code = MHD_HTTP_NOT_FOUND
    2224             :   },
    2225             : 
    2226             :   {
    2227             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_REFUND_REFUSED_PAYMENT_COMPLETE,
    2228             :     .hint = gettext_noop ("The payment was already completed and thus cannot be aborted anymore."),
    2229             :     .http_code = MHD_HTTP_PRECONDITION_FAILED
    2230             :   },
    2231             : 
    2232             :   {
    2233             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_CONTRACT_HASH_MISSMATCH,
    2234             :     .hint = gettext_noop ("The hash provided by the wallet does not match the order."),
    2235             :     .http_code = MHD_HTTP_FORBIDDEN
    2236             :   },
    2237             : 
    2238             :   {
    2239             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_COINS_ARRAY_EMPTY,
    2240             :     .hint = gettext_noop ("The array of coins cannot be empty."),
    2241             :     .http_code = MHD_HTTP_BAD_REQUEST
    2242             :   },
    2243             : 
    2244             :   {
    2245             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_AWAITING_KEYS,
    2246             :     .hint = gettext_noop ("We are waiting for the exchange to provide us with key material before checking the wire transfer."),
    2247             :     .http_code = MHD_HTTP_ACCEPTED
    2248             :   },
    2249             : 
    2250             :   {
    2251             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_AWAITING_LIST,
    2252             :     .hint = gettext_noop ("We are waiting for the exchange to provide us with the list of aggregated transactions."),
    2253             :     .http_code = MHD_HTTP_ACCEPTED
    2254             :   },
    2255             : 
    2256             :   {
    2257             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_FATAL_NO_EXCHANGE,
    2258             :     .hint = gettext_noop ("The endpoint indicated in the wire transfer does not belong to a GNU Taler exchange."),
    2259             :     .http_code = MHD_HTTP_OK
    2260             :   },
    2261             : 
    2262             :   {
    2263             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_FATAL_NOT_FOUND,
    2264             :     .hint = gettext_noop ("The exchange indicated in the wire transfer claims to know nothing about the wire transfer."),
    2265             :     .http_code = MHD_HTTP_UNINITIALIZED
    2266             :   },
    2267             : 
    2268             :   {
    2269             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_RATE_LIMITED,
    2270             :     .hint = gettext_noop ("The interaction with the exchange is delayed due to rate limiting."),
    2271             :     .http_code = MHD_HTTP_ACCEPTED
    2272             :   },
    2273             : 
    2274             :   {
    2275             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_TRANSIENT_FAILURE,
    2276             :     .hint = gettext_noop ("We experienced a transient failure in our interaction with the exchange."),
    2277             :     .http_code = MHD_HTTP_ACCEPTED
    2278             :   },
    2279             : 
    2280             :   {
    2281             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_HARD_FAILURE,
    2282             :     .hint = gettext_noop ("The response from the exchange was unacceptable and should be reviewed with an auditor."),
    2283             :     .http_code = MHD_HTTP_OK
    2284             :   },
    2285             : 
    2286             :   {
    2287             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_NOT_FOUND,
    2288             :     .hint = gettext_noop ("We could not claim the order because the backend is unaware of it."),
    2289             :     .http_code = MHD_HTTP_NOT_FOUND
    2290             :   },
    2291             : 
    2292             :   {
    2293             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_ALREADY_CLAIMED,
    2294             :     .hint = gettext_noop ("We could not claim the order because someone else claimed it first."),
    2295             :     .http_code = MHD_HTTP_CONFLICT
    2296             :   },
    2297             : 
    2298             :   {
    2299             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_CLIENT_INTERNAL_FAILURE,
    2300             :     .hint = gettext_noop ("The client-side experienced an internal failure."),
    2301             :     .http_code = MHD_HTTP_UNINITIALIZED
    2302             :   },
    2303             : 
    2304             :   {
    2305             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_REFUND_SIGNATURE_FAILED,
    2306             :     .hint = gettext_noop ("The backend failed to sign the refund request."),
    2307             :     .http_code = MHD_HTTP_UNINITIALIZED
    2308             :   },
    2309             : 
    2310             :   {
    2311             :     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_UNBLIND_FAILURE,
    2312             :     .hint = gettext_noop ("The client failed to unblind the signature returned by the merchant."),
    2313             :     .http_code = MHD_HTTP_UNINITIALIZED
    2314             :   },
    2315             : 
    2316             :   {
    2317             :     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_EXCHANGE_ERROR,
    2318             :     .hint = gettext_noop ("The exchange returned a failure code for the withdraw operation."),
    2319             :     .http_code = MHD_HTTP_BAD_GATEWAY
    2320             :   },
    2321             : 
    2322             :   {
    2323             :     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_SUMMATION_FAILED,
    2324             :     .hint = gettext_noop ("The merchant failed to add up the amounts to compute the pick up value."),
    2325             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2326             :   },
    2327             : 
    2328             :   {
    2329             :     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_HAS_EXPIRED,
    2330             :     .hint = gettext_noop ("The reward expired."),
    2331             :     .http_code = MHD_HTTP_GONE
    2332             :   },
    2333             : 
    2334             :   {
    2335             :     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_AMOUNT_EXCEEDS_REWARD_REMAINING,
    2336             :     .hint = gettext_noop ("The requested withdraw amount exceeds the amount remaining to be picked up."),
    2337             :     .http_code = MHD_HTTP_BAD_REQUEST
    2338             :   },
    2339             : 
    2340             :   {
    2341             :     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_DENOMINATION_UNKNOWN,
    2342             :     .hint = gettext_noop ("The merchant did not find the specified denomination key in the exchange's key set."),
    2343             :     .http_code = MHD_HTTP_CONFLICT
    2344             :   },
    2345             : 
    2346             :   {
    2347             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE,
    2348             :     .hint = gettext_noop ("The merchant instance has no active bank accounts configured. However, at least one bank account must be available to create new orders."),
    2349             :     .http_code = MHD_HTTP_NOT_FOUND
    2350             :   },
    2351             : 
    2352             :   {
    2353             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_NO_LOCALTIME,
    2354             :     .hint = gettext_noop ("The proposal had no timestamp and the merchant backend failed to obtain the current local time."),
    2355             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2356             :   },
    2357             : 
    2358             :   {
    2359             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_PROPOSAL_PARSE_ERROR,
    2360             :     .hint = gettext_noop ("The order provided to the backend could not be parsed; likely some required fields were missing or ill-formed."),
    2361             :     .http_code = MHD_HTTP_BAD_REQUEST
    2362             :   },
    2363             : 
    2364             :   {
    2365             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ALREADY_EXISTS,
    2366             :     .hint = gettext_noop ("A conflicting order (sharing the same order identifier) already exists at this merchant backend instance."),
    2367             :     .http_code = MHD_HTTP_CONFLICT
    2368             :   },
    2369             : 
    2370             :   {
    2371             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_REFUND_AFTER_WIRE_DEADLINE,
    2372             :     .hint = gettext_noop ("The order creation request is invalid because the given wire deadline is before the refund deadline."),
    2373             :     .http_code = MHD_HTTP_BAD_REQUEST
    2374             :   },
    2375             : 
    2376             :   {
    2377             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_DELIVERY_DATE_IN_PAST,
    2378             :     .hint = gettext_noop ("The order creation request is invalid because the delivery date given is in the past."),
    2379             :     .http_code = MHD_HTTP_BAD_REQUEST
    2380             :   },
    2381             : 
    2382             :   {
    2383             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_WIRE_DEADLINE_IS_NEVER,
    2384             :     .hint = gettext_noop ("The order creation request is invalid because a wire deadline of \"never\" is not allowed."),
    2385             :     .http_code = MHD_HTTP_BAD_REQUEST
    2386             :   },
    2387             : 
    2388             :   {
    2389             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_PAY_DEADLINE_IN_PAST,
    2390             :     .hint = gettext_noop ("The order creation request is invalid because the given payment deadline is in the past."),
    2391             :     .http_code = MHD_HTTP_BAD_REQUEST
    2392             :   },
    2393             : 
    2394             :   {
    2395             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_REFUND_DEADLINE_IN_PAST,
    2396             :     .hint = gettext_noop ("The order creation request is invalid because the given refund deadline is in the past."),
    2397             :     .http_code = MHD_HTTP_BAD_REQUEST
    2398             :   },
    2399             : 
    2400             :   {
    2401             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGES_FOR_WIRE_METHOD,
    2402             :     .hint = gettext_noop ("The backend does not trust any exchange that would allow funds to be wired to any bank account of this instance using the wire method specified with the order. (Note that right now, we do not support the use of exchange bank accounts with mandatory currency conversion.) One likely cause for this is that the taler-merchant-exchangekeyupdate process is not running."),
    2403             :     .http_code = MHD_HTTP_CONFLICT
    2404             :   },
    2405             : 
    2406             :   {
    2407             :     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT,
    2408             :     .hint = gettext_noop ("One of the paths to forget is malformed."),
    2409             :     .http_code = MHD_HTTP_BAD_REQUEST
    2410             :   },
    2411             : 
    2412             :   {
    2413             :     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_NOT_FORGETTABLE,
    2414             :     .hint = gettext_noop ("One of the paths to forget was not marked as forgettable."),
    2415             :     .http_code = MHD_HTTP_CONFLICT
    2416             :   },
    2417             : 
    2418             :   {
    2419             :     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_REFUND_EXCHANGE_TRANSACTION_LIMIT_VIOLATION,
    2420             :     .hint = gettext_noop ("The refund amount would violate a refund transaction limit configured at the given exchange. Please find another way to refund the customer, and inquire with your legislator why they make strange banking regulations."),
    2421             :     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
    2422             :   },
    2423             : 
    2424             :   {
    2425             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_AMOUNT_EXCEEDS_LEGAL_LIMITS,
    2426             :     .hint = gettext_noop ("The total order amount exceeds hard legal transaction limits from the available exchanges, thus a customer could never legally make this payment. You may try to increase your limits by passing legitimization checks with exchange operators. You could also inquire with your legislator why the limits are prohibitively low for your business."),
    2427             :     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
    2428             :   },
    2429             : 
    2430             :   {
    2431             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGE_FOR_CURRENCY,
    2432             :     .hint = gettext_noop ("A currency specified to be paid in the contract is not supported by any exchange that this instance can currently use. Possible solutions include (1) specifying a different currency, (2) adding additional suitable exchange operators to the merchant backend configuration, or (3) satisfying compliance rules of an configured exchange to begin using the service of that provider."),
    2433             :     .http_code = MHD_HTTP_CONFLICT
    2434             :   },
    2435             : 
    2436             :   {
    2437             :     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT,
    2438             :     .hint = gettext_noop ("The order provided to the backend could not be deleted, our offer is still valid and awaiting payment. Deletion may work later after the offer has expired if it remains unpaid."),
    2439             :     .http_code = MHD_HTTP_CONFLICT
    2440             :   },
    2441             : 
    2442             :   {
    2443             :     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_ALREADY_PAID,
    2444             :     .hint = gettext_noop ("The order provided to the backend could not be deleted as the order was already paid."),
    2445             :     .http_code = MHD_HTTP_CONFLICT
    2446             :   },
    2447             : 
    2448             :   {
    2449             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_INCONSISTENT_AMOUNT,
    2450             :     .hint = gettext_noop ("The amount to be refunded is inconsistent: either is lower than the previous amount being awarded, or it exceeds the original price paid by the customer."),
    2451             :     .http_code = MHD_HTTP_CONFLICT
    2452             :   },
    2453             : 
    2454             :   {
    2455             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID,
    2456             :     .hint = gettext_noop ("Only paid orders can be refunded, and the frontend specified an unpaid order to issue a refund for."),
    2457             :     .http_code = MHD_HTTP_CONFLICT
    2458             :   },
    2459             : 
    2460             :   {
    2461             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT,
    2462             :     .hint = gettext_noop ("The refund delay was set to 0 and thus no refunds are ever allowed for this order."),
    2463             :     .http_code = MHD_HTTP_FORBIDDEN
    2464             :   },
    2465             : 
    2466             :   {
    2467             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_TOKEN_FAMILY_SLUG_UNKNOWN,
    2468             :     .hint = gettext_noop ("The token family slug provided in this order could not be found in the merchant database."),
    2469             :     .http_code = MHD_HTTP_NOT_FOUND
    2470             :   },
    2471             : 
    2472             :   {
    2473             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_TOKEN_FAMILY_NOT_VALID,
    2474             :     .hint = gettext_noop ("A token family referenced in this order is either expired or not valid yet."),
    2475             :     .http_code = MHD_HTTP_CONFLICT
    2476             :   },
    2477             : 
    2478             :   {
    2479             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_EXCHANGE_UNKNOWN,
    2480             :     .hint = gettext_noop ("The exchange says it does not know this transfer."),
    2481             :     .http_code = MHD_HTTP_BAD_GATEWAY
    2482             :   },
    2483             : 
    2484             :   {
    2485             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_REQUEST_ERROR,
    2486             :     .hint = gettext_noop ("We internally failed to execute the /track/transfer request."),
    2487             :     .http_code = MHD_HTTP_BAD_GATEWAY
    2488             :   },
    2489             : 
    2490             :   {
    2491             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_TRANSFERS,
    2492             :     .hint = gettext_noop ("The amount transferred differs between what was submitted and what the exchange claimed."),
    2493             :     .http_code = MHD_HTTP_CONFLICT
    2494             :   },
    2495             : 
    2496             :   {
    2497             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_REPORTS,
    2498             :     .hint = gettext_noop ("The exchange gave conflicting information about a coin which has been wire transferred."),
    2499             :     .http_code = MHD_HTTP_CONFLICT
    2500             :   },
    2501             : 
    2502             :   {
    2503             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_BAD_WIRE_FEE,
    2504             :     .hint = gettext_noop ("The exchange charged a different wire fee than what it originally advertised, and it is higher."),
    2505             :     .http_code = MHD_HTTP_BAD_GATEWAY
    2506             :   },
    2507             : 
    2508             :   {
    2509             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_ACCOUNT_NOT_FOUND,
    2510             :     .hint = gettext_noop ("We did not find the account that the transfer was made to."),
    2511             :     .http_code = MHD_HTTP_NOT_FOUND
    2512             :   },
    2513             : 
    2514             :   {
    2515             :     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_TRANSFERS_ALREADY_CONFIRMED,
    2516             :     .hint = gettext_noop ("The backend could not delete the transfer as the echange already replied to our inquiry about it and we have integrated the result."),
    2517             :     .http_code = MHD_HTTP_CONFLICT
    2518             :   },
    2519             : 
    2520             :   {
    2521             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_SUBMISSION,
    2522             :     .hint = gettext_noop ("The backend was previously informed about a wire transfer with the same ID but a different amount. Multiple wire transfers with the same ID are not allowed. If the new amount is correct, the old transfer should first be deleted."),
    2523             :     .http_code = MHD_HTTP_CONFLICT
    2524             :   },
    2525             : 
    2526             :   {
    2527             :     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_CONFLICTING_TRANSFERS,
    2528             :     .hint = gettext_noop ("The amount transferred differs between what was submitted and what the exchange claimed."),
    2529             :     .http_code = MHD_HTTP_UNINITIALIZED
    2530             :   },
    2531             : 
    2532             :   {
    2533             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_ALREADY_EXISTS,
    2534             :     .hint = gettext_noop ("The merchant backend cannot create an instance under the given identifier as one already exists. Use PATCH to modify the existing entry."),
    2535             :     .http_code = MHD_HTTP_CONFLICT
    2536             :   },
    2537             : 
    2538             :   {
    2539             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_BAD_AUTH,
    2540             :     .hint = gettext_noop ("The merchant backend cannot create an instance because the authentication configuration field is malformed."),
    2541             :     .http_code = MHD_HTTP_BAD_REQUEST
    2542             :   },
    2543             : 
    2544             :   {
    2545             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCE_AUTH_BAD_AUTH,
    2546             :     .hint = gettext_noop ("The merchant backend cannot update an instance's authentication settings because the provided authentication settings are malformed."),
    2547             :     .http_code = MHD_HTTP_BAD_REQUEST
    2548             :   },
    2549             : 
    2550             :   {
    2551             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_PURGE_REQUIRED,
    2552             :     .hint = gettext_noop ("The merchant backend cannot create an instance under the given identifier, the previous one was deleted but must be purged first."),
    2553             :     .http_code = MHD_HTTP_CONFLICT
    2554             :   },
    2555             : 
    2556             :   {
    2557             :     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_INSTANCES_PURGE_REQUIRED,
    2558             :     .hint = gettext_noop ("The merchant backend cannot update an instance under the given identifier, the previous one was deleted but must be purged first."),
    2559             :     .http_code = MHD_HTTP_CONFLICT
    2560             :   },
    2561             : 
    2562             :   {
    2563             :     .ec = TALER_EC_MERCHANT_PRIVATE_ACCOUNT_DELETE_UNKNOWN_ACCOUNT,
    2564             :     .hint = gettext_noop ("The bank account referenced in the requested operation was not found."),
    2565             :     .http_code = MHD_HTTP_NOT_FOUND
    2566             :   },
    2567             : 
    2568             :   {
    2569             :     .ec = TALER_EC_MERCHANT_PRIVATE_ACCOUNT_EXISTS,
    2570             :     .hint = gettext_noop ("The bank account specified in the request already exists at the merchant."),
    2571             :     .http_code = MHD_HTTP_CONFLICT
    2572             :   },
    2573             : 
    2574             :   {
    2575             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_PRODUCTS_CONFLICT_PRODUCT_EXISTS,
    2576             :     .hint = gettext_noop ("The product ID exists."),
    2577             :     .http_code = MHD_HTTP_CONFLICT
    2578             :   },
    2579             : 
    2580             :   {
    2581             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_CATEGORIES_CONFLICT_CATEGORY_EXISTS,
    2582             :     .hint = gettext_noop ("A category with the same name exists already."),
    2583             :     .http_code = MHD_HTTP_CONFLICT
    2584             :   },
    2585             : 
    2586             :   {
    2587             :     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_LOST_REDUCED,
    2588             :     .hint = gettext_noop ("The update would have reduced the total amount of product lost, which is not allowed."),
    2589             :     .http_code = MHD_HTTP_CONFLICT
    2590             :   },
    2591             : 
    2592             :   {
    2593             :     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_LOST_EXCEEDS_STOCKS,
    2594             :     .hint = gettext_noop ("The update would have mean that more stocks were lost than what remains from total inventory after sales, which is not allowed."),
    2595             :     .http_code = MHD_HTTP_BAD_REQUEST
    2596             :   },
    2597             : 
    2598             :   {
    2599             :     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_STOCKED_REDUCED,
    2600             :     .hint = gettext_noop ("The update would have reduced the total amount of product in stock, which is not allowed."),
    2601             :     .http_code = MHD_HTTP_CONFLICT
    2602             :   },
    2603             : 
    2604             :   {
    2605             :     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_SOLD_REDUCED,
    2606             :     .hint = gettext_noop ("The update would have reduced the total amount of product sold, which is not allowed."),
    2607             :     .http_code = MHD_HTTP_CONFLICT
    2608             :   },
    2609             : 
    2610             :   {
    2611             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_PRODUCTS_LOCK_INSUFFICIENT_STOCKS,
    2612             :     .hint = gettext_noop ("The lock request is for more products than we have left (unlocked) in stock."),
    2613             :     .http_code = MHD_HTTP_GONE
    2614             :   },
    2615             : 
    2616             :   {
    2617             :     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_PRODUCTS_CONFLICTING_LOCK,
    2618             :     .hint = gettext_noop ("The deletion request is for a product that is locked."),
    2619             :     .http_code = MHD_HTTP_CONFLICT
    2620             :   },
    2621             : 
    2622             :   {
    2623             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_RESERVES_UNSUPPORTED_WIRE_METHOD,
    2624             :     .hint = gettext_noop ("The requested wire method is not supported by the exchange."),
    2625             :     .http_code = MHD_HTTP_CONFLICT
    2626             :   },
    2627             : 
    2628             :   {
    2629             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_RESERVES_REWARDS_NOT_ALLOWED,
    2630             :     .hint = gettext_noop ("The requested exchange does not allow rewards."),
    2631             :     .http_code = MHD_HTTP_CONFLICT
    2632             :   },
    2633             : 
    2634             :   {
    2635             :     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_RESERVES_NO_SUCH_RESERVE,
    2636             :     .hint = gettext_noop ("The reserve could not be deleted because it is unknown."),
    2637             :     .http_code = MHD_HTTP_NOT_FOUND
    2638             :   },
    2639             : 
    2640             :   {
    2641             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_EXPIRED,
    2642             :     .hint = gettext_noop ("The reserve that was used to fund the rewards has expired."),
    2643             :     .http_code = MHD_HTTP_GONE
    2644             :   },
    2645             : 
    2646             :   {
    2647             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_UNKNOWN,
    2648             :     .hint = gettext_noop ("The reserve that was used to fund the rewards was not found in the DB."),
    2649             :     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
    2650             :   },
    2651             : 
    2652             :   {
    2653             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_INSUFFICIENT_FUNDS,
    2654             :     .hint = gettext_noop ("The backend knows the instance that was supposed to support the reward, and it was configured for rewardping. However, the funds remaining are insufficient to cover the reward, and the merchant should top up the reserve."),
    2655             :     .http_code = MHD_HTTP_UNINITIALIZED
    2656             :   },
    2657             : 
    2658             :   {
    2659             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_NOT_FOUND,
    2660             :     .hint = gettext_noop ("The backend failed to find a reserve needed to authorize the reward."),
    2661             :     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
    2662             :   },
    2663             : 
    2664             :   {
    2665             :     .ec = TALER_EC_MERCHANT_PRIVATE_GET_ORDERS_ID_AMOUNT_ARITHMETIC_FAILURE,
    2666             :     .hint = gettext_noop ("The merchant backend encountered a failure in computing the deposit total."),
    2667             :     .http_code = MHD_HTTP_OK
    2668             :   },
    2669             : 
    2670             :   {
    2671             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TEMPLATES_CONFLICT_TEMPLATE_EXISTS,
    2672             :     .hint = gettext_noop ("The template ID already exists."),
    2673             :     .http_code = MHD_HTTP_CONFLICT
    2674             :   },
    2675             : 
    2676             :   {
    2677             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_OTP_DEVICES_CONFLICT_OTP_DEVICE_EXISTS,
    2678             :     .hint = gettext_noop ("The OTP device ID already exists."),
    2679             :     .http_code = MHD_HTTP_CONFLICT
    2680             :   },
    2681             : 
    2682             :   {
    2683             :     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_AMOUNT_CONFLICT_TEMPLATES_CONTRACT_AMOUNT,
    2684             :     .hint = gettext_noop ("Amount given in the using template and in the template contract. There is a conflict."),
    2685             :     .http_code = MHD_HTTP_CONFLICT
    2686             :   },
    2687             : 
    2688             :   {
    2689             :     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_SUMMARY_CONFLICT_TEMPLATES_CONTRACT_SUBJECT,
    2690             :     .hint = gettext_noop ("Subject given in the using template and in the template contract. There is a conflict."),
    2691             :     .http_code = MHD_HTTP_CONFLICT
    2692             :   },
    2693             : 
    2694             :   {
    2695             :     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_NO_AMOUNT,
    2696             :     .hint = gettext_noop ("Amount not given in the using template and in the template contract. There is a conflict."),
    2697             :     .http_code = MHD_HTTP_CONFLICT
    2698             :   },
    2699             : 
    2700             :   {
    2701             :     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_NO_SUMMARY,
    2702             :     .hint = gettext_noop ("Subject not given in the using template and in the template contract. There is a conflict."),
    2703             :     .http_code = MHD_HTTP_CONFLICT
    2704             :   },
    2705             : 
    2706             :   {
    2707             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_WEBHOOKS_CONFLICT_WEBHOOK_EXISTS,
    2708             :     .hint = gettext_noop ("The webhook ID elready exists."),
    2709             :     .http_code = MHD_HTTP_CONFLICT
    2710             :   },
    2711             : 
    2712             :   {
    2713             :     .ec = TALER_EC_MERCHANT_PRIVATE_POST_PENDING_WEBHOOKS_CONFLICT_PENDING_WEBHOOK_EXISTS,
    2714             :     .hint = gettext_noop ("The webhook serial elready exists."),
    2715             :     .http_code = MHD_HTTP_CONFLICT
    2716             :   },
    2717             : 
    2718             :   {
    2719             :     .ec = TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED,
    2720             :     .hint = gettext_noop ("The auditor refused the connection due to a lack of authorization."),
    2721             :     .http_code = MHD_HTTP_UNAUTHORIZED
    2722             :   },
    2723             : 
    2724             :   {
    2725             :     .ec = TALER_EC_AUDITOR_GENERIC_METHOD_NOT_ALLOWED,
    2726             :     .hint = gettext_noop ("This method is not allowed here."),
    2727             :     .http_code = MHD_HTTP_METHOD_NOT_ALLOWED
    2728             :   },
    2729             : 
    2730             :   {
    2731             :     .ec = TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID,
    2732             :     .hint = gettext_noop ("The signature from the exchange on the deposit confirmation is invalid."),
    2733             :     .http_code = MHD_HTTP_FORBIDDEN
    2734             :   },
    2735             : 
    2736             :   {
    2737             :     .ec = TALER_EC_AUDITOR_EXCHANGE_SIGNING_KEY_REVOKED,
    2738             :     .hint = gettext_noop ("The exchange key used for the signature on the deposit confirmation was revoked."),
    2739             :     .http_code = MHD_HTTP_GONE
    2740             :   },
    2741             : 
    2742             :   {
    2743             :     .ec = TALER_EC_AUDITOR_RESOURCE_NOT_FOUND,
    2744             :     .hint = gettext_noop ("The requested resource could not be found."),
    2745             :     .http_code = MHD_HTTP_NOT_FOUND
    2746             :   },
    2747             : 
    2748             :   {
    2749             :     .ec = TALER_EC_AUDITOR_URI_MISSING_PATH_COMPONENT,
    2750             :     .hint = gettext_noop ("The URI is missing a path component."),
    2751             :     .http_code = MHD_HTTP_BAD_REQUEST
    2752             :   },
    2753             : 
    2754             :   {
    2755             :     .ec = TALER_EC_BANK_SAME_ACCOUNT,
    2756             :     .hint = gettext_noop ("Wire transfer attempted with credit and debit party being the same bank account."),
    2757             :     .http_code = MHD_HTTP_BAD_REQUEST
    2758             :   },
    2759             : 
    2760             :   {
    2761             :     .ec = TALER_EC_BANK_UNALLOWED_DEBIT,
    2762             :     .hint = gettext_noop ("Wire transfer impossible, due to financial limitation of the party that attempted the payment."),
    2763             :     .http_code = MHD_HTTP_CONFLICT
    2764             :   },
    2765             : 
    2766             :   {
    2767             :     .ec = TALER_EC_BANK_NEGATIVE_NUMBER_AMOUNT,
    2768             :     .hint = gettext_noop ("Negative numbers are not allowed (as value and/or fraction) to instantiate an amount object."),
    2769             :     .http_code = MHD_HTTP_BAD_REQUEST
    2770             :   },
    2771             : 
    2772             :   {
    2773             :     .ec = TALER_EC_BANK_NUMBER_TOO_BIG,
    2774             :     .hint = gettext_noop ("A too big number was used (as value and/or fraction) to instantiate an amount object."),
    2775             :     .http_code = MHD_HTTP_BAD_REQUEST
    2776             :   },
    2777             : 
    2778             :   {
    2779             :     .ec = TALER_EC_BANK_UNKNOWN_ACCOUNT,
    2780             :     .hint = gettext_noop ("The bank account referenced in the requested operation was not found."),
    2781             :     .http_code = MHD_HTTP_NOT_FOUND
    2782             :   },
    2783             : 
    2784             :   {
    2785             :     .ec = TALER_EC_BANK_TRANSACTION_NOT_FOUND,
    2786             :     .hint = gettext_noop ("The transaction referenced in the requested operation (typically a reject operation), was not found."),
    2787             :     .http_code = MHD_HTTP_NOT_FOUND
    2788             :   },
    2789             : 
    2790             :   {
    2791             :     .ec = TALER_EC_BANK_BAD_FORMAT_AMOUNT,
    2792             :     .hint = gettext_noop ("Bank received a malformed amount string."),
    2793             :     .http_code = MHD_HTTP_BAD_REQUEST
    2794             :   },
    2795             : 
    2796             :   {
    2797             :     .ec = TALER_EC_BANK_REJECT_NO_RIGHTS,
    2798             :     .hint = gettext_noop ("The client does not own the account credited by the transaction which is to be rejected, so it has no rights do reject it."),
    2799             :     .http_code = MHD_HTTP_FORBIDDEN
    2800             :   },
    2801             : 
    2802             :   {
    2803             :     .ec = TALER_EC_BANK_UNMANAGED_EXCEPTION,
    2804             :     .hint = gettext_noop ("This error code is returned when no known exception types captured the exception."),
    2805             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2806             :   },
    2807             : 
    2808             :   {
    2809             :     .ec = TALER_EC_BANK_SOFT_EXCEPTION,
    2810             :     .hint = gettext_noop ("This error code is used for all those exceptions that do not really need a specific error code to return to the client. Used for example when a client is trying to register with a unavailable username."),
    2811             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2812             :   },
    2813             : 
    2814             :   {
    2815             :     .ec = TALER_EC_BANK_TRANSFER_REQUEST_UID_REUSED,
    2816             :     .hint = gettext_noop ("The request UID for a request to transfer funds has already been used, but with different details for the transfer."),
    2817             :     .http_code = MHD_HTTP_CONFLICT
    2818             :   },
    2819             : 
    2820             :   {
    2821             :     .ec = TALER_EC_BANK_WITHDRAWAL_OPERATION_RESERVE_SELECTION_CONFLICT,
    2822             :     .hint = gettext_noop ("The withdrawal operation already has a reserve selected.  The current request conflicts with the existing selection."),
    2823             :     .http_code = MHD_HTTP_CONFLICT
    2824             :   },
    2825             : 
    2826             :   {
    2827             :     .ec = TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT,
    2828             :     .hint = gettext_noop ("The wire transfer subject duplicates an existing reserve public key. But wire transfer subjects must be unique."),
    2829             :     .http_code = MHD_HTTP_CONFLICT
    2830             :   },
    2831             : 
    2832             :   {
    2833             :     .ec = TALER_EC_BANK_ANCIENT_TRANSACTION_GONE,
    2834             :     .hint = gettext_noop ("The client requested a transaction that is so far in the past, that it has been forgotten by the bank."),
    2835             :     .http_code = MHD_HTTP_GONE
    2836             :   },
    2837             : 
    2838             :   {
    2839             :     .ec = TALER_EC_BANK_ABORT_CONFIRM_CONFLICT,
    2840             :     .hint = gettext_noop ("The client attempted to abort a transaction that was already confirmed."),
    2841             :     .http_code = MHD_HTTP_CONFLICT
    2842             :   },
    2843             : 
    2844             :   {
    2845             :     .ec = TALER_EC_BANK_CONFIRM_ABORT_CONFLICT,
    2846             :     .hint = gettext_noop ("The client attempted to confirm a transaction that was already aborted."),
    2847             :     .http_code = MHD_HTTP_CONFLICT
    2848             :   },
    2849             : 
    2850             :   {
    2851             :     .ec = TALER_EC_BANK_REGISTER_CONFLICT,
    2852             :     .hint = gettext_noop ("The client attempted to register an account with the same name."),
    2853             :     .http_code = MHD_HTTP_CONFLICT
    2854             :   },
    2855             : 
    2856             :   {
    2857             :     .ec = TALER_EC_BANK_POST_WITHDRAWAL_OPERATION_REQUIRED,
    2858             :     .hint = gettext_noop ("The client attempted to confirm a withdrawal operation before the wallet posted the required details."),
    2859             :     .http_code = MHD_HTTP_BAD_REQUEST
    2860             :   },
    2861             : 
    2862             :   {
    2863             :     .ec = TALER_EC_BANK_RESERVED_USERNAME_CONFLICT,
    2864             :     .hint = gettext_noop ("The client tried to register a new account under a reserved username (like 'admin' for example)."),
    2865             :     .http_code = MHD_HTTP_CONFLICT
    2866             :   },
    2867             : 
    2868             :   {
    2869             :     .ec = TALER_EC_BANK_REGISTER_USERNAME_REUSE,
    2870             :     .hint = gettext_noop ("The client tried to register a new account with an username already in use."),
    2871             :     .http_code = MHD_HTTP_CONFLICT
    2872             :   },
    2873             : 
    2874             :   {
    2875             :     .ec = TALER_EC_BANK_REGISTER_PAYTO_URI_REUSE,
    2876             :     .hint = gettext_noop ("The client tried to register a new account with a payto:// URI already in use."),
    2877             :     .http_code = MHD_HTTP_CONFLICT
    2878             :   },
    2879             : 
    2880             :   {
    2881             :     .ec = TALER_EC_BANK_ACCOUNT_BALANCE_NOT_ZERO,
    2882             :     .hint = gettext_noop ("The client tried to delete an account with a non null balance."),
    2883             :     .http_code = MHD_HTTP_CONFLICT
    2884             :   },
    2885             : 
    2886             :   {
    2887             :     .ec = TALER_EC_BANK_UNKNOWN_CREDITOR,
    2888             :     .hint = gettext_noop ("The client tried to create a transaction or an operation that credit an unknown account."),
    2889             :     .http_code = MHD_HTTP_CONFLICT
    2890             :   },
    2891             : 
    2892             :   {
    2893             :     .ec = TALER_EC_BANK_UNKNOWN_DEBTOR,
    2894             :     .hint = gettext_noop ("The client tried to create a transaction or an operation that debit an unknown account."),
    2895             :     .http_code = MHD_HTTP_CONFLICT
    2896             :   },
    2897             : 
    2898             :   {
    2899             :     .ec = TALER_EC_BANK_ACCOUNT_IS_EXCHANGE,
    2900             :     .hint = gettext_noop ("The client tried to perform an action prohibited for exchange accounts."),
    2901             :     .http_code = MHD_HTTP_CONFLICT
    2902             :   },
    2903             : 
    2904             :   {
    2905             :     .ec = TALER_EC_BANK_ACCOUNT_IS_NOT_EXCHANGE,
    2906             :     .hint = gettext_noop ("The client tried to perform an action reserved for exchange accounts."),
    2907             :     .http_code = MHD_HTTP_CONFLICT
    2908             :   },
    2909             : 
    2910             :   {
    2911             :     .ec = TALER_EC_BANK_BAD_CONVERSION,
    2912             :     .hint = gettext_noop ("Received currency conversion is wrong."),
    2913             :     .http_code = MHD_HTTP_CONFLICT
    2914             :   },
    2915             : 
    2916             :   {
    2917             :     .ec = TALER_EC_BANK_MISSING_TAN_INFO,
    2918             :     .hint = gettext_noop ("The account referenced in this operation is missing tan info for the chosen channel."),
    2919             :     .http_code = MHD_HTTP_CONFLICT
    2920             :   },
    2921             : 
    2922             :   {
    2923             :     .ec = TALER_EC_BANK_CONFIRM_INCOMPLETE,
    2924             :     .hint = gettext_noop ("The client attempted to confirm a transaction with incomplete info."),
    2925             :     .http_code = MHD_HTTP_CONFLICT
    2926             :   },
    2927             : 
    2928             :   {
    2929             :     .ec = TALER_EC_BANK_TAN_RATE_LIMITED,
    2930             :     .hint = gettext_noop ("The request rate is too high. The server is refusing requests to guard against brute-force attacks."),
    2931             :     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
    2932             :   },
    2933             : 
    2934             :   {
    2935             :     .ec = TALER_EC_BANK_TAN_CHANNEL_NOT_SUPPORTED,
    2936             :     .hint = gettext_noop ("This TAN channel is not supported."),
    2937             :     .http_code = MHD_HTTP_NOT_IMPLEMENTED
    2938             :   },
    2939             : 
    2940             :   {
    2941             :     .ec = TALER_EC_BANK_TAN_CHANNEL_SCRIPT_FAILED,
    2942             :     .hint = gettext_noop ("Failed to send TAN using the helper script. Either script is not found, or script timeout, or script terminated with a non-successful result."),
    2943             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    2944             :   },
    2945             : 
    2946             :   {
    2947             :     .ec = TALER_EC_BANK_TAN_CHALLENGE_FAILED,
    2948             :     .hint = gettext_noop ("The client's response to the challenge was invalid."),
    2949             :     .http_code = MHD_HTTP_FORBIDDEN
    2950             :   },
    2951             : 
    2952             :   {
    2953             :     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_LEGAL_NAME,
    2954             :     .hint = gettext_noop ("A non-admin user has tried to change their legal name."),
    2955             :     .http_code = MHD_HTTP_CONFLICT
    2956             :   },
    2957             : 
    2958             :   {
    2959             :     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_DEBT_LIMIT,
    2960             :     .hint = gettext_noop ("A non-admin user has tried to change their debt limit."),
    2961             :     .http_code = MHD_HTTP_CONFLICT
    2962             :   },
    2963             : 
    2964             :   {
    2965             :     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD,
    2966             :     .hint = gettext_noop ("A non-admin user has tried to change their password whihout providing the current one."),
    2967             :     .http_code = MHD_HTTP_CONFLICT
    2968             :   },
    2969             : 
    2970             :   {
    2971             :     .ec = TALER_EC_BANK_PATCH_BAD_OLD_PASSWORD,
    2972             :     .hint = gettext_noop ("Provided old password does not match current password."),
    2973             :     .http_code = MHD_HTTP_CONFLICT
    2974             :   },
    2975             : 
    2976             :   {
    2977             :     .ec = TALER_EC_BANK_PATCH_ADMIN_EXCHANGE,
    2978             :     .hint = gettext_noop ("An admin user has tried to become an exchange."),
    2979             :     .http_code = MHD_HTTP_CONFLICT
    2980             :   },
    2981             : 
    2982             :   {
    2983             :     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_CASHOUT,
    2984             :     .hint = gettext_noop ("A non-admin user has tried to change their cashout account."),
    2985             :     .http_code = MHD_HTTP_CONFLICT
    2986             :   },
    2987             : 
    2988             :   {
    2989             :     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_CONTACT,
    2990             :     .hint = gettext_noop ("A non-admin user has tried to change their contact info."),
    2991             :     .http_code = MHD_HTTP_CONFLICT
    2992             :   },
    2993             : 
    2994             :   {
    2995             :     .ec = TALER_EC_BANK_ADMIN_CREDITOR,
    2996             :     .hint = gettext_noop ("The client tried to create a transaction that credit the admin account."),
    2997             :     .http_code = MHD_HTTP_CONFLICT
    2998             :   },
    2999             : 
    3000             :   {
    3001             :     .ec = TALER_EC_BANK_CHALLENGE_NOT_FOUND,
    3002             :     .hint = gettext_noop ("The referenced challenge was not found."),
    3003             :     .http_code = MHD_HTTP_NOT_FOUND
    3004             :   },
    3005             : 
    3006             :   {
    3007             :     .ec = TALER_EC_BANK_TAN_CHALLENGE_EXPIRED,
    3008             :     .hint = gettext_noop ("The referenced challenge has expired."),
    3009             :     .http_code = MHD_HTTP_CONFLICT
    3010             :   },
    3011             : 
    3012             :   {
    3013             :     .ec = TALER_EC_BANK_NON_ADMIN_SET_TAN_CHANNEL,
    3014             :     .hint = gettext_noop ("A non-admin user has tried to create an account with 2fa."),
    3015             :     .http_code = MHD_HTTP_CONFLICT
    3016             :   },
    3017             : 
    3018             :   {
    3019             :     .ec = TALER_EC_BANK_NON_ADMIN_SET_MIN_CASHOUT,
    3020             :     .hint = gettext_noop ("A non-admin user has tried to set their minimum cashout amount."),
    3021             :     .http_code = MHD_HTTP_CONFLICT
    3022             :   },
    3023             : 
    3024             :   {
    3025             :     .ec = TALER_EC_BANK_CONVERSION_AMOUNT_TO_SMALL,
    3026             :     .hint = gettext_noop ("Amount of currency conversion it less than the minimum allowed."),
    3027             :     .http_code = MHD_HTTP_CONFLICT
    3028             :   },
    3029             : 
    3030             :   {
    3031             :     .ec = TALER_EC_BANK_AMOUNT_DIFFERS,
    3032             :     .hint = gettext_noop ("Specified amount will not work for this withdrawal."),
    3033             :     .http_code = MHD_HTTP_CONFLICT
    3034             :   },
    3035             : 
    3036             :   {
    3037             :     .ec = TALER_EC_BANK_AMOUNT_REQUIRED,
    3038             :     .hint = gettext_noop ("The backend requires an amount to be specified."),
    3039             :     .http_code = MHD_HTTP_CONFLICT
    3040             :   },
    3041             : 
    3042             :   {
    3043             :     .ec = TALER_EC_BANK_PASSWORD_TOO_SHORT,
    3044             :     .hint = gettext_noop ("Provided password is too short."),
    3045             :     .http_code = MHD_HTTP_CONFLICT
    3046             :   },
    3047             : 
    3048             :   {
    3049             :     .ec = TALER_EC_BANK_PASSWORD_TOO_LONG,
    3050             :     .hint = gettext_noop ("Provided password is too long."),
    3051             :     .http_code = MHD_HTTP_CONFLICT
    3052             :   },
    3053             : 
    3054             :   {
    3055             :     .ec = TALER_EC_BANK_ACCOUNT_LOCKED,
    3056             :     .hint = gettext_noop ("Bank account is locked and cannot authenticate using his password."),
    3057             :     .http_code = MHD_HTTP_FORBIDDEN
    3058             :   },
    3059             : 
    3060             :   {
    3061             :     .ec = TALER_EC_BANK_UPDATE_ABORT_CONFLICT,
    3062             :     .hint = gettext_noop ("The client attempted to update a transaction' details that was already aborted."),
    3063             :     .http_code = MHD_HTTP_CONFLICT
    3064             :   },
    3065             : 
    3066             :   {
    3067             :     .ec = TALER_EC_BANK_TRANSFER_WTID_REUSED,
    3068             :     .hint = gettext_noop ("The wtid for a request to transfer funds has already been used, but with a different request unpaid."),
    3069             :     .http_code = MHD_HTTP_CONFLICT
    3070             :   },
    3071             : 
    3072             :   {
    3073             :     .ec = TALER_EC_SYNC_ACCOUNT_UNKNOWN,
    3074             :     .hint = gettext_noop ("The sync service failed find the account in its database."),
    3075             :     .http_code = MHD_HTTP_NOT_FOUND
    3076             :   },
    3077             : 
    3078             :   {
    3079             :     .ec = TALER_EC_SYNC_BAD_IF_NONE_MATCH,
    3080             :     .hint = gettext_noop ("The SHA-512 hash provided in the If-None-Match header is malformed."),
    3081             :     .http_code = MHD_HTTP_BAD_REQUEST
    3082             :   },
    3083             : 
    3084             :   {
    3085             :     .ec = TALER_EC_SYNC_BAD_IF_MATCH,
    3086             :     .hint = gettext_noop ("The SHA-512 hash provided in the If-Match header is malformed or missing."),
    3087             :     .http_code = MHD_HTTP_BAD_REQUEST
    3088             :   },
    3089             : 
    3090             :   {
    3091             :     .ec = TALER_EC_SYNC_BAD_SYNC_SIGNATURE,
    3092             :     .hint = gettext_noop ("The signature provided in the \"Sync-Signature\" header is malformed or missing."),
    3093             :     .http_code = MHD_HTTP_BAD_REQUEST
    3094             :   },
    3095             : 
    3096             :   {
    3097             :     .ec = TALER_EC_SYNC_INVALID_SIGNATURE,
    3098             :     .hint = gettext_noop ("The signature provided in the \"Sync-Signature\" header does not match the account, old or new Etags."),
    3099             :     .http_code = MHD_HTTP_FORBIDDEN
    3100             :   },
    3101             : 
    3102             :   {
    3103             :     .ec = TALER_EC_SYNC_MALFORMED_CONTENT_LENGTH,
    3104             :     .hint = gettext_noop ("The \"Content-length\" field for the upload is not a number."),
    3105             :     .http_code = MHD_HTTP_BAD_REQUEST
    3106             :   },
    3107             : 
    3108             :   {
    3109             :     .ec = TALER_EC_SYNC_EXCESSIVE_CONTENT_LENGTH,
    3110             :     .hint = gettext_noop ("The \"Content-length\" field for the upload is too big based on the server's terms of service."),
    3111             :     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
    3112             :   },
    3113             : 
    3114             :   {
    3115             :     .ec = TALER_EC_SYNC_OUT_OF_MEMORY_ON_CONTENT_LENGTH,
    3116             :     .hint = gettext_noop ("The server is out of memory to handle the upload. Trying again later may succeed."),
    3117             :     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
    3118             :   },
    3119             : 
    3120             :   {
    3121             :     .ec = TALER_EC_SYNC_INVALID_UPLOAD,
    3122             :     .hint = gettext_noop ("The uploaded data does not match the Etag."),
    3123             :     .http_code = MHD_HTTP_BAD_REQUEST
    3124             :   },
    3125             : 
    3126             :   {
    3127             :     .ec = TALER_EC_SYNC_PAYMENT_GENERIC_TIMEOUT,
    3128             :     .hint = gettext_noop ("HTTP server experienced a timeout while awaiting promised payment."),
    3129             :     .http_code = MHD_HTTP_REQUEST_TIMEOUT
    3130             :   },
    3131             : 
    3132             :   {
    3133             :     .ec = TALER_EC_SYNC_PAYMENT_CREATE_BACKEND_ERROR,
    3134             :     .hint = gettext_noop ("Sync could not setup the payment request with its own backend."),
    3135             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3136             :   },
    3137             : 
    3138             :   {
    3139             :     .ec = TALER_EC_SYNC_PREVIOUS_BACKUP_UNKNOWN,
    3140             :     .hint = gettext_noop ("The sync service failed find the backup to be updated in its database."),
    3141             :     .http_code = MHD_HTTP_NOT_FOUND
    3142             :   },
    3143             : 
    3144             :   {
    3145             :     .ec = TALER_EC_SYNC_MISSING_CONTENT_LENGTH,
    3146             :     .hint = gettext_noop ("The \"Content-length\" field for the upload is missing."),
    3147             :     .http_code = MHD_HTTP_BAD_REQUEST
    3148             :   },
    3149             : 
    3150             :   {
    3151             :     .ec = TALER_EC_SYNC_GENERIC_BACKEND_ERROR,
    3152             :     .hint = gettext_noop ("Sync had problems communicating with its payment backend."),
    3153             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3154             :   },
    3155             : 
    3156             :   {
    3157             :     .ec = TALER_EC_SYNC_GENERIC_BACKEND_TIMEOUT,
    3158             :     .hint = gettext_noop ("Sync experienced a timeout communicating with its payment backend."),
    3159             :     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
    3160             :   },
    3161             : 
    3162             :   {
    3163             :     .ec = TALER_EC_WALLET_EXCHANGE_PROTOCOL_VERSION_INCOMPATIBLE,
    3164             :     .hint = gettext_noop ("The wallet does not implement a version of the exchange protocol that is compatible with the protocol version of the exchange."),
    3165             :     .http_code = MHD_HTTP_NOT_IMPLEMENTED
    3166             :   },
    3167             : 
    3168             :   {
    3169             :     .ec = TALER_EC_WALLET_UNEXPECTED_EXCEPTION,
    3170             :     .hint = gettext_noop ("The wallet encountered an unexpected exception.  This is likely a bug in the wallet implementation."),
    3171             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3172             :   },
    3173             : 
    3174             :   {
    3175             :     .ec = TALER_EC_WALLET_RECEIVED_MALFORMED_RESPONSE,
    3176             :     .hint = gettext_noop ("The wallet received a response from a server, but the response can't be parsed."),
    3177             :     .http_code = MHD_HTTP_UNINITIALIZED
    3178             :   },
    3179             : 
    3180             :   {
    3181             :     .ec = TALER_EC_WALLET_NETWORK_ERROR,
    3182             :     .hint = gettext_noop ("The wallet tried to make a network request, but it received no response."),
    3183             :     .http_code = MHD_HTTP_UNINITIALIZED
    3184             :   },
    3185             : 
    3186             :   {
    3187             :     .ec = TALER_EC_WALLET_HTTP_REQUEST_THROTTLED,
    3188             :     .hint = gettext_noop ("The wallet tried to make a network request, but it was throttled."),
    3189             :     .http_code = MHD_HTTP_UNINITIALIZED
    3190             :   },
    3191             : 
    3192             :   {
    3193             :     .ec = TALER_EC_WALLET_UNEXPECTED_REQUEST_ERROR,
    3194             :     .hint = gettext_noop ("The wallet made a request to a service, but received an error response it does not know how to handle."),
    3195             :     .http_code = MHD_HTTP_UNINITIALIZED
    3196             :   },
    3197             : 
    3198             :   {
    3199             :     .ec = TALER_EC_WALLET_EXCHANGE_DENOMINATIONS_INSUFFICIENT,
    3200             :     .hint = gettext_noop ("The denominations offered by the exchange are insufficient.  Likely the exchange is badly configured or not maintained."),
    3201             :     .http_code = MHD_HTTP_UNINITIALIZED
    3202             :   },
    3203             : 
    3204             :   {
    3205             :     .ec = TALER_EC_WALLET_CORE_API_OPERATION_UNKNOWN,
    3206             :     .hint = gettext_noop ("The wallet does not support the operation requested by a client."),
    3207             :     .http_code = MHD_HTTP_UNINITIALIZED
    3208             :   },
    3209             : 
    3210             :   {
    3211             :     .ec = TALER_EC_WALLET_INVALID_TALER_PAY_URI,
    3212             :     .hint = gettext_noop ("The given taler://pay URI is invalid."),
    3213             :     .http_code = MHD_HTTP_UNINITIALIZED
    3214             :   },
    3215             : 
    3216             :   {
    3217             :     .ec = TALER_EC_WALLET_EXCHANGE_COIN_SIGNATURE_INVALID,
    3218             :     .hint = gettext_noop ("The signature on a coin by the exchange's denomination key is invalid after unblinding it."),
    3219             :     .http_code = MHD_HTTP_UNINITIALIZED
    3220             :   },
    3221             : 
    3222             :   {
    3223             :     .ec = TALER_EC_WALLET_EXCHANGE_WITHDRAW_RESERVE_UNKNOWN_AT_EXCHANGE,
    3224             :     .hint = gettext_noop ("The exchange does not know about the reserve (yet), and thus withdrawal can't progress."),
    3225             :     .http_code = MHD_HTTP_NOT_FOUND
    3226             :   },
    3227             : 
    3228             :   {
    3229             :     .ec = TALER_EC_WALLET_CORE_NOT_AVAILABLE,
    3230             :     .hint = gettext_noop ("The wallet core service is not available."),
    3231             :     .http_code = MHD_HTTP_UNINITIALIZED
    3232             :   },
    3233             : 
    3234             :   {
    3235             :     .ec = TALER_EC_WALLET_WITHDRAWAL_OPERATION_ABORTED_BY_BANK,
    3236             :     .hint = gettext_noop ("The bank has aborted a withdrawal operation, and thus a withdrawal can't complete."),
    3237             :     .http_code = MHD_HTTP_UNINITIALIZED
    3238             :   },
    3239             : 
    3240             :   {
    3241             :     .ec = TALER_EC_WALLET_HTTP_REQUEST_GENERIC_TIMEOUT,
    3242             :     .hint = gettext_noop ("An HTTP request made by the wallet timed out."),
    3243             :     .http_code = MHD_HTTP_UNINITIALIZED
    3244             :   },
    3245             : 
    3246             :   {
    3247             :     .ec = TALER_EC_WALLET_ORDER_ALREADY_CLAIMED,
    3248             :     .hint = gettext_noop ("The order has already been claimed by another wallet."),
    3249             :     .http_code = MHD_HTTP_UNINITIALIZED
    3250             :   },
    3251             : 
    3252             :   {
    3253             :     .ec = TALER_EC_WALLET_WITHDRAWAL_GROUP_INCOMPLETE,
    3254             :     .hint = gettext_noop ("A group of withdrawal operations (typically for the same reserve at the same exchange) has errors and will be tried again later."),
    3255             :     .http_code = MHD_HTTP_UNINITIALIZED
    3256             :   },
    3257             : 
    3258             :   {
    3259             :     .ec = TALER_EC_WALLET_REWARD_COIN_SIGNATURE_INVALID,
    3260             :     .hint = gettext_noop ("The signature on a coin by the exchange's denomination key (obtained through the merchant via a reward) is invalid after unblinding it."),
    3261             :     .http_code = MHD_HTTP_UNINITIALIZED
    3262             :   },
    3263             : 
    3264             :   {
    3265             :     .ec = TALER_EC_WALLET_BANK_INTEGRATION_PROTOCOL_VERSION_INCOMPATIBLE,
    3266             :     .hint = gettext_noop ("The wallet does not implement a version of the bank integration API that is compatible with the version offered by the bank."),
    3267             :     .http_code = MHD_HTTP_UNINITIALIZED
    3268             :   },
    3269             : 
    3270             :   {
    3271             :     .ec = TALER_EC_WALLET_CONTRACT_TERMS_BASE_URL_MISMATCH,
    3272             :     .hint = gettext_noop ("The wallet processed a taler://pay URI, but the merchant base URL in the downloaded contract terms does not match the merchant base URL derived from the URI."),
    3273             :     .http_code = MHD_HTTP_UNINITIALIZED
    3274             :   },
    3275             : 
    3276             :   {
    3277             :     .ec = TALER_EC_WALLET_CONTRACT_TERMS_SIGNATURE_INVALID,
    3278             :     .hint = gettext_noop ("The merchant's signature on the contract terms is invalid."),
    3279             :     .http_code = MHD_HTTP_UNINITIALIZED
    3280             :   },
    3281             : 
    3282             :   {
    3283             :     .ec = TALER_EC_WALLET_CONTRACT_TERMS_MALFORMED,
    3284             :     .hint = gettext_noop ("The contract terms given by the merchant are malformed."),
    3285             :     .http_code = MHD_HTTP_UNINITIALIZED
    3286             :   },
    3287             : 
    3288             :   {
    3289             :     .ec = TALER_EC_WALLET_PENDING_OPERATION_FAILED,
    3290             :     .hint = gettext_noop ("A pending operation failed, and thus the request can't be completed."),
    3291             :     .http_code = MHD_HTTP_UNINITIALIZED
    3292             :   },
    3293             : 
    3294             :   {
    3295             :     .ec = TALER_EC_WALLET_PAY_MERCHANT_SERVER_ERROR,
    3296             :     .hint = gettext_noop ("A payment was attempted, but the merchant had an internal server error (5xx)."),
    3297             :     .http_code = MHD_HTTP_UNINITIALIZED
    3298             :   },
    3299             : 
    3300             :   {
    3301             :     .ec = TALER_EC_WALLET_CRYPTO_WORKER_ERROR,
    3302             :     .hint = gettext_noop ("The crypto worker failed."),
    3303             :     .http_code = MHD_HTTP_UNINITIALIZED
    3304             :   },
    3305             : 
    3306             :   {
    3307             :     .ec = TALER_EC_WALLET_CRYPTO_WORKER_BAD_REQUEST,
    3308             :     .hint = gettext_noop ("The crypto worker received a bad request."),
    3309             :     .http_code = MHD_HTTP_UNINITIALIZED
    3310             :   },
    3311             : 
    3312             :   {
    3313             :     .ec = TALER_EC_WALLET_WITHDRAWAL_KYC_REQUIRED,
    3314             :     .hint = gettext_noop ("A KYC step is required before withdrawal can proceed."),
    3315             :     .http_code = MHD_HTTP_UNINITIALIZED
    3316             :   },
    3317             : 
    3318             :   {
    3319             :     .ec = TALER_EC_WALLET_DEPOSIT_GROUP_INSUFFICIENT_BALANCE,
    3320             :     .hint = gettext_noop ("The wallet does not have sufficient balance to create a deposit group."),
    3321             :     .http_code = MHD_HTTP_UNINITIALIZED
    3322             :   },
    3323             : 
    3324             :   {
    3325             :     .ec = TALER_EC_WALLET_PEER_PUSH_PAYMENT_INSUFFICIENT_BALANCE,
    3326             :     .hint = gettext_noop ("The wallet does not have sufficient balance to create a peer push payment."),
    3327             :     .http_code = MHD_HTTP_UNINITIALIZED
    3328             :   },
    3329             : 
    3330             :   {
    3331             :     .ec = TALER_EC_WALLET_PEER_PULL_PAYMENT_INSUFFICIENT_BALANCE,
    3332             :     .hint = gettext_noop ("The wallet does not have sufficient balance to pay for an invoice."),
    3333             :     .http_code = MHD_HTTP_UNINITIALIZED
    3334             :   },
    3335             : 
    3336             :   {
    3337             :     .ec = TALER_EC_WALLET_REFRESH_GROUP_INCOMPLETE,
    3338             :     .hint = gettext_noop ("A group of refresh operations has errors and will be tried again later."),
    3339             :     .http_code = MHD_HTTP_UNINITIALIZED
    3340             :   },
    3341             : 
    3342             :   {
    3343             :     .ec = TALER_EC_WALLET_EXCHANGE_BASE_URL_MISMATCH,
    3344             :     .hint = gettext_noop ("The exchange's self-reported base URL does not match the one that the wallet is using."),
    3345             :     .http_code = MHD_HTTP_UNINITIALIZED
    3346             :   },
    3347             : 
    3348             :   {
    3349             :     .ec = TALER_EC_WALLET_ORDER_ALREADY_PAID,
    3350             :     .hint = gettext_noop ("The order has already been paid by another wallet."),
    3351             :     .http_code = MHD_HTTP_UNINITIALIZED
    3352             :   },
    3353             : 
    3354             :   {
    3355             :     .ec = TALER_EC_WALLET_EXCHANGE_UNAVAILABLE,
    3356             :     .hint = gettext_noop ("An exchange that is required for some request is currently not available."),
    3357             :     .http_code = MHD_HTTP_UNINITIALIZED
    3358             :   },
    3359             : 
    3360             :   {
    3361             :     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_USED,
    3362             :     .hint = gettext_noop ("An exchange entry is still used by the exchange, thus it can't be deleted without purging."),
    3363             :     .http_code = MHD_HTTP_UNINITIALIZED
    3364             :   },
    3365             : 
    3366             :   {
    3367             :     .ec = TALER_EC_WALLET_DB_UNAVAILABLE,
    3368             :     .hint = gettext_noop ("The wallet database is unavailable and the wallet thus is not operational."),
    3369             :     .http_code = MHD_HTTP_UNINITIALIZED
    3370             :   },
    3371             : 
    3372             :   {
    3373             :     .ec = TALER_EC_WALLET_TALER_URI_MALFORMED,
    3374             :     .hint = gettext_noop ("A taler:// URI is malformed and can't be parsed."),
    3375             :     .http_code = MHD_HTTP_UNINITIALIZED
    3376             :   },
    3377             : 
    3378             :   {
    3379             :     .ec = TALER_EC_WALLET_CORE_REQUEST_CANCELLED,
    3380             :     .hint = gettext_noop ("A wallet-core request was cancelled and thus can't provide a response."),
    3381             :     .http_code = MHD_HTTP_UNINITIALIZED
    3382             :   },
    3383             : 
    3384             :   {
    3385             :     .ec = TALER_EC_WALLET_EXCHANGE_TOS_NOT_ACCEPTED,
    3386             :     .hint = gettext_noop ("A wallet-core request failed because the user needs to first accept the exchange's terms of service."),
    3387             :     .http_code = MHD_HTTP_UNINITIALIZED
    3388             :   },
    3389             : 
    3390             :   {
    3391             :     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_UPDATE_CONFLICT,
    3392             :     .hint = gettext_noop ("An exchange entry could not be updated, as the exchange's new details conflict with the new details."),
    3393             :     .http_code = MHD_HTTP_UNINITIALIZED
    3394             :   },
    3395             : 
    3396             :   {
    3397             :     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_OUTDATED,
    3398             :     .hint = gettext_noop ("The wallet's information about the exchange is outdated."),
    3399             :     .http_code = MHD_HTTP_UNINITIALIZED
    3400             :   },
    3401             : 
    3402             :   {
    3403             :     .ec = TALER_EC_WALLET_PAY_MERCHANT_KYC_MISSING,
    3404             :     .hint = gettext_noop ("The merchant needs to do KYC first, the payment could not be completed."),
    3405             :     .http_code = MHD_HTTP_UNINITIALIZED
    3406             :   },
    3407             : 
    3408             :   {
    3409             :     .ec = TALER_EC_WALLET_PEER_PULL_DEBIT_PURSE_GONE,
    3410             :     .hint = gettext_noop ("A peer-pull-debit transaction was aborted because the exchange reported the purse as gone."),
    3411             :     .http_code = MHD_HTTP_UNINITIALIZED
    3412             :   },
    3413             : 
    3414             :   {
    3415             :     .ec = TALER_EC_WALLET_TRANSACTION_ABORTED_BY_USER,
    3416             :     .hint = gettext_noop ("A transaction was aborted on explicit request by the user."),
    3417             :     .http_code = MHD_HTTP_UNINITIALIZED
    3418             :   },
    3419             : 
    3420             :   {
    3421             :     .ec = TALER_EC_WALLET_TRANSACTION_ABANDONED_BY_USER,
    3422             :     .hint = gettext_noop ("A transaction was abandoned on explicit request by the user."),
    3423             :     .http_code = MHD_HTTP_UNINITIALIZED
    3424             :   },
    3425             : 
    3426             :   {
    3427             :     .ec = TALER_EC_WALLET_PAY_MERCHANT_ORDER_GONE,
    3428             :     .hint = gettext_noop ("A payment was attempted, but the merchant claims the order is gone (likely expired)."),
    3429             :     .http_code = MHD_HTTP_UNINITIALIZED
    3430             :   },
    3431             : 
    3432             :   {
    3433             :     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_NOT_FOUND,
    3434             :     .hint = gettext_noop ("The wallet does not have an entry for the requested exchange."),
    3435             :     .http_code = MHD_HTTP_UNINITIALIZED
    3436             :   },
    3437             : 
    3438             :   {
    3439             :     .ec = TALER_EC_WALLET_REQUEST_TRANSACTION_STATE_UNSUPPORTED,
    3440             :     .hint = gettext_noop ("The wallet is not able to process the request due to the transaction's state."),
    3441             :     .http_code = MHD_HTTP_UNINITIALIZED
    3442             :   },
    3443             : 
    3444             :   {
    3445             :     .ec = TALER_EC_WALLET_TRANSACTION_PROTOCOL_VIOLATION,
    3446             :     .hint = gettext_noop ("A transaction could not be processed due to an unrecoverable protocol violation."),
    3447             :     .http_code = MHD_HTTP_UNINITIALIZED
    3448             :   },
    3449             : 
    3450             :   {
    3451             :     .ec = TALER_EC_WALLET_CORE_API_BAD_REQUEST,
    3452             :     .hint = gettext_noop ("A parameter in the request is malformed or missing."),
    3453             :     .http_code = MHD_HTTP_UNINITIALIZED
    3454             :   },
    3455             : 
    3456             :   {
    3457             :     .ec = TALER_EC_ANASTASIS_GENERIC_BACKEND_TIMEOUT,
    3458             :     .hint = gettext_noop ("We encountered a timeout with our payment backend."),
    3459             :     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
    3460             :   },
    3461             : 
    3462             :   {
    3463             :     .ec = TALER_EC_ANASTASIS_GENERIC_INVALID_PAYMENT_REQUEST,
    3464             :     .hint = gettext_noop ("The backend requested payment, but the request is malformed."),
    3465             :     .http_code = MHD_HTTP_UNINITIALIZED
    3466             :   },
    3467             : 
    3468             :   {
    3469             :     .ec = TALER_EC_ANASTASIS_GENERIC_BACKEND_ERROR,
    3470             :     .hint = gettext_noop ("The backend got an unexpected reply from the payment processor."),
    3471             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3472             :   },
    3473             : 
    3474             :   {
    3475             :     .ec = TALER_EC_ANASTASIS_GENERIC_MISSING_CONTENT_LENGTH,
    3476             :     .hint = gettext_noop ("The \"Content-length\" field for the upload is missing."),
    3477             :     .http_code = MHD_HTTP_BAD_REQUEST
    3478             :   },
    3479             : 
    3480             :   {
    3481             :     .ec = TALER_EC_ANASTASIS_GENERIC_MALFORMED_CONTENT_LENGTH,
    3482             :     .hint = gettext_noop ("The \"Content-length\" field for the upload is malformed."),
    3483             :     .http_code = MHD_HTTP_BAD_REQUEST
    3484             :   },
    3485             : 
    3486             :   {
    3487             :     .ec = TALER_EC_ANASTASIS_GENERIC_ORDER_CREATE_BACKEND_ERROR,
    3488             :     .hint = gettext_noop ("The backend failed to setup an order with the payment processor."),
    3489             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3490             :   },
    3491             : 
    3492             :   {
    3493             :     .ec = TALER_EC_ANASTASIS_GENERIC_PAYMENT_CHECK_UNAUTHORIZED,
    3494             :     .hint = gettext_noop ("The backend was not authorized to check for payment with the payment processor."),
    3495             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3496             :   },
    3497             : 
    3498             :   {
    3499             :     .ec = TALER_EC_ANASTASIS_GENERIC_PAYMENT_CHECK_START_FAILED,
    3500             :     .hint = gettext_noop ("The backend could not check payment status with the payment processor."),
    3501             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3502             :   },
    3503             : 
    3504             :   {
    3505             :     .ec = TALER_EC_ANASTASIS_GENERIC_PROVIDER_UNREACHABLE,
    3506             :     .hint = gettext_noop ("The Anastasis provider could not be reached."),
    3507             :     .http_code = MHD_HTTP_UNINITIALIZED
    3508             :   },
    3509             : 
    3510             :   {
    3511             :     .ec = TALER_EC_ANASTASIS_PAYMENT_GENERIC_TIMEOUT,
    3512             :     .hint = gettext_noop ("HTTP server experienced a timeout while awaiting promised payment."),
    3513             :     .http_code = MHD_HTTP_REQUEST_TIMEOUT
    3514             :   },
    3515             : 
    3516             :   {
    3517             :     .ec = TALER_EC_ANASTASIS_TRUTH_UNKNOWN,
    3518             :     .hint = gettext_noop ("The key share is unknown to the provider."),
    3519             :     .http_code = MHD_HTTP_NOT_FOUND
    3520             :   },
    3521             : 
    3522             :   {
    3523             :     .ec = TALER_EC_ANASTASIS_TRUTH_AUTHORIZATION_METHOD_NO_LONGER_SUPPORTED,
    3524             :     .hint = gettext_noop ("The authorization method used for the key share is no longer supported by the provider."),
    3525             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3526             :   },
    3527             : 
    3528             :   {
    3529             :     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED,
    3530             :     .hint = gettext_noop ("The client needs to respond to the challenge."),
    3531             :     .http_code = MHD_HTTP_FORBIDDEN
    3532             :   },
    3533             : 
    3534             :   {
    3535             :     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_FAILED,
    3536             :     .hint = gettext_noop ("The client's response to the challenge was invalid."),
    3537             :     .http_code = MHD_HTTP_FORBIDDEN
    3538             :   },
    3539             : 
    3540             :   {
    3541             :     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_UNKNOWN,
    3542             :     .hint = gettext_noop ("The backend is not aware of having issued the provided challenge code. Either this is the wrong code, or it has expired."),
    3543             :     .http_code = MHD_HTTP_NOT_FOUND
    3544             :   },
    3545             : 
    3546             :   {
    3547             :     .ec = TALER_EC_ANASTASIS_TRUTH_AUTHORIZATION_START_FAILED,
    3548             :     .hint = gettext_noop ("The backend failed to initiate the authorization process."),
    3549             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3550             :   },
    3551             : 
    3552             :   {
    3553             :     .ec = TALER_EC_ANASTASIS_TRUTH_KEY_SHARE_GONE,
    3554             :     .hint = gettext_noop ("The authorization succeeded, but the key share is no longer available."),
    3555             :     .http_code = MHD_HTTP_NOT_FOUND
    3556             :   },
    3557             : 
    3558             :   {
    3559             :     .ec = TALER_EC_ANASTASIS_TRUTH_ORDER_DISAPPEARED,
    3560             :     .hint = gettext_noop ("The backend forgot the order we asked the client to pay for"),
    3561             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3562             :   },
    3563             : 
    3564             :   {
    3565             :     .ec = TALER_EC_ANASTASIS_TRUTH_BACKEND_EXCHANGE_BAD,
    3566             :     .hint = gettext_noop ("The backend itself reported a bad exchange interaction."),
    3567             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3568             :   },
    3569             : 
    3570             :   {
    3571             :     .ec = TALER_EC_ANASTASIS_TRUTH_UNEXPECTED_PAYMENT_STATUS,
    3572             :     .hint = gettext_noop ("The backend reported a payment status we did not expect."),
    3573             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3574             :   },
    3575             : 
    3576             :   {
    3577             :     .ec = TALER_EC_ANASTASIS_TRUTH_PAYMENT_CREATE_BACKEND_ERROR,
    3578             :     .hint = gettext_noop ("The backend failed to setup the order for payment."),
    3579             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3580             :   },
    3581             : 
    3582             :   {
    3583             :     .ec = TALER_EC_ANASTASIS_TRUTH_DECRYPTION_FAILED,
    3584             :     .hint = gettext_noop ("The decryption of the key share failed with the provided key."),
    3585             :     .http_code = MHD_HTTP_BAD_REQUEST
    3586             :   },
    3587             : 
    3588             :   {
    3589             :     .ec = TALER_EC_ANASTASIS_TRUTH_RATE_LIMITED,
    3590             :     .hint = gettext_noop ("The request rate is too high. The server is refusing requests to guard against brute-force attacks."),
    3591             :     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
    3592             :   },
    3593             : 
    3594             :   {
    3595             :     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_WRONG_METHOD,
    3596             :     .hint = gettext_noop ("A request to issue a challenge is not valid for this authentication method."),
    3597             :     .http_code = MHD_HTTP_BAD_REQUEST
    3598             :   },
    3599             : 
    3600             :   {
    3601             :     .ec = TALER_EC_ANASTASIS_TRUTH_UPLOAD_UUID_EXISTS,
    3602             :     .hint = gettext_noop ("The backend failed to store the key share because the UUID is already in use."),
    3603             :     .http_code = MHD_HTTP_CONFLICT
    3604             :   },
    3605             : 
    3606             :   {
    3607             :     .ec = TALER_EC_ANASTASIS_TRUTH_UPLOAD_METHOD_NOT_SUPPORTED,
    3608             :     .hint = gettext_noop ("The backend failed to store the key share because the authorization method is not supported."),
    3609             :     .http_code = MHD_HTTP_BAD_REQUEST
    3610             :   },
    3611             : 
    3612             :   {
    3613             :     .ec = TALER_EC_ANASTASIS_SMS_PHONE_INVALID,
    3614             :     .hint = gettext_noop ("The provided phone number is not an acceptable number."),
    3615             :     .http_code = MHD_HTTP_CONFLICT
    3616             :   },
    3617             : 
    3618             :   {
    3619             :     .ec = TALER_EC_ANASTASIS_SMS_HELPER_EXEC_FAILED,
    3620             :     .hint = gettext_noop ("Failed to run the SMS transmission helper process."),
    3621             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3622             :   },
    3623             : 
    3624             :   {
    3625             :     .ec = TALER_EC_ANASTASIS_SMS_HELPER_COMMAND_FAILED,
    3626             :     .hint = gettext_noop ("Provider failed to send SMS. Helper terminated with a non-successful result."),
    3627             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3628             :   },
    3629             : 
    3630             :   {
    3631             :     .ec = TALER_EC_ANASTASIS_EMAIL_INVALID,
    3632             :     .hint = gettext_noop ("The provided email address is not an acceptable address."),
    3633             :     .http_code = MHD_HTTP_CONFLICT
    3634             :   },
    3635             : 
    3636             :   {
    3637             :     .ec = TALER_EC_ANASTASIS_EMAIL_HELPER_EXEC_FAILED,
    3638             :     .hint = gettext_noop ("Failed to run the E-mail transmission helper process."),
    3639             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3640             :   },
    3641             : 
    3642             :   {
    3643             :     .ec = TALER_EC_ANASTASIS_EMAIL_HELPER_COMMAND_FAILED,
    3644             :     .hint = gettext_noop ("Provider failed to send E-mail. Helper terminated with a non-successful result."),
    3645             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3646             :   },
    3647             : 
    3648             :   {
    3649             :     .ec = TALER_EC_ANASTASIS_POST_INVALID,
    3650             :     .hint = gettext_noop ("The provided postal address is not an acceptable address."),
    3651             :     .http_code = MHD_HTTP_CONFLICT
    3652             :   },
    3653             : 
    3654             :   {
    3655             :     .ec = TALER_EC_ANASTASIS_POST_HELPER_EXEC_FAILED,
    3656             :     .hint = gettext_noop ("Failed to run the mail transmission helper process."),
    3657             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3658             :   },
    3659             : 
    3660             :   {
    3661             :     .ec = TALER_EC_ANASTASIS_POST_HELPER_COMMAND_FAILED,
    3662             :     .hint = gettext_noop ("Provider failed to send mail. Helper terminated with a non-successful result."),
    3663             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3664             :   },
    3665             : 
    3666             :   {
    3667             :     .ec = TALER_EC_ANASTASIS_IBAN_INVALID,
    3668             :     .hint = gettext_noop ("The provided IBAN address is not an acceptable IBAN."),
    3669             :     .http_code = MHD_HTTP_CONFLICT
    3670             :   },
    3671             : 
    3672             :   {
    3673             :     .ec = TALER_EC_ANASTASIS_IBAN_MISSING_TRANSFER,
    3674             :     .hint = gettext_noop ("The provider has not yet received the IBAN wire transfer authorizing the disclosure of the key share."),
    3675             :     .http_code = MHD_HTTP_FORBIDDEN
    3676             :   },
    3677             : 
    3678             :   {
    3679             :     .ec = TALER_EC_ANASTASIS_TOTP_KEY_MISSING,
    3680             :     .hint = gettext_noop ("The backend did not find a TOTP key in the data provided."),
    3681             :     .http_code = MHD_HTTP_CONFLICT
    3682             :   },
    3683             : 
    3684             :   {
    3685             :     .ec = TALER_EC_ANASTASIS_TOTP_KEY_INVALID,
    3686             :     .hint = gettext_noop ("The key provided does not satisfy the format restrictions for an Anastasis TOTP key."),
    3687             :     .http_code = MHD_HTTP_CONFLICT
    3688             :   },
    3689             : 
    3690             :   {
    3691             :     .ec = TALER_EC_ANASTASIS_POLICY_BAD_IF_NONE_MATCH,
    3692             :     .hint = gettext_noop ("The given if-none-match header is malformed."),
    3693             :     .http_code = MHD_HTTP_BAD_REQUEST
    3694             :   },
    3695             : 
    3696             :   {
    3697             :     .ec = TALER_EC_ANASTASIS_POLICY_OUT_OF_MEMORY_ON_CONTENT_LENGTH,
    3698             :     .hint = gettext_noop ("The server is out of memory to handle the upload. Trying again later may succeed."),
    3699             :     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
    3700             :   },
    3701             : 
    3702             :   {
    3703             :     .ec = TALER_EC_ANASTASIS_POLICY_BAD_SIGNATURE,
    3704             :     .hint = gettext_noop ("The signature provided in the \"Anastasis-Policy-Signature\" header is malformed or missing."),
    3705             :     .http_code = MHD_HTTP_BAD_REQUEST
    3706             :   },
    3707             : 
    3708             :   {
    3709             :     .ec = TALER_EC_ANASTASIS_POLICY_BAD_IF_MATCH,
    3710             :     .hint = gettext_noop ("The given if-match header is malformed."),
    3711             :     .http_code = MHD_HTTP_BAD_REQUEST
    3712             :   },
    3713             : 
    3714             :   {
    3715             :     .ec = TALER_EC_ANASTASIS_POLICY_INVALID_UPLOAD,
    3716             :     .hint = gettext_noop ("The uploaded data does not match the Etag."),
    3717             :     .http_code = MHD_HTTP_BAD_REQUEST
    3718             :   },
    3719             : 
    3720             :   {
    3721             :     .ec = TALER_EC_ANASTASIS_POLICY_NOT_FOUND,
    3722             :     .hint = gettext_noop ("The provider is unaware of the requested policy."),
    3723             :     .http_code = MHD_HTTP_NOT_FOUND
    3724             :   },
    3725             : 
    3726             :   {
    3727             :     .ec = TALER_EC_ANASTASIS_REDUCER_ACTION_INVALID,
    3728             :     .hint = gettext_noop ("The given action is invalid for the current state of the reducer."),
    3729             :     .http_code = MHD_HTTP_UNINITIALIZED
    3730             :   },
    3731             : 
    3732             :   {
    3733             :     .ec = TALER_EC_ANASTASIS_REDUCER_STATE_INVALID,
    3734             :     .hint = gettext_noop ("The given state of the reducer is invalid."),
    3735             :     .http_code = MHD_HTTP_UNINITIALIZED
    3736             :   },
    3737             : 
    3738             :   {
    3739             :     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_INVALID,
    3740             :     .hint = gettext_noop ("The given input to the reducer is invalid."),
    3741             :     .http_code = MHD_HTTP_UNINITIALIZED
    3742             :   },
    3743             : 
    3744             :   {
    3745             :     .ec = TALER_EC_ANASTASIS_REDUCER_AUTHENTICATION_METHOD_NOT_SUPPORTED,
    3746             :     .hint = gettext_noop ("The selected authentication method does not work for the Anastasis provider."),
    3747             :     .http_code = MHD_HTTP_UNINITIALIZED
    3748             :   },
    3749             : 
    3750             :   {
    3751             :     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_INVALID_FOR_STATE,
    3752             :     .hint = gettext_noop ("The given input and action do not work for the current state."),
    3753             :     .http_code = MHD_HTTP_UNINITIALIZED
    3754             :   },
    3755             : 
    3756             :   {
    3757             :     .ec = TALER_EC_ANASTASIS_REDUCER_BACKEND_FAILURE,
    3758             :     .hint = gettext_noop ("We experienced an unexpected failure interacting with the backend."),
    3759             :     .http_code = MHD_HTTP_UNINITIALIZED
    3760             :   },
    3761             : 
    3762             :   {
    3763             :     .ec = TALER_EC_ANASTASIS_REDUCER_RESOURCE_MALFORMED,
    3764             :     .hint = gettext_noop ("The contents of a resource file did not match our expectations."),
    3765             :     .http_code = MHD_HTTP_UNINITIALIZED
    3766             :   },
    3767             : 
    3768             :   {
    3769             :     .ec = TALER_EC_ANASTASIS_REDUCER_RESOURCE_MISSING,
    3770             :     .hint = gettext_noop ("A required resource file is missing."),
    3771             :     .http_code = MHD_HTTP_UNINITIALIZED
    3772             :   },
    3773             : 
    3774             :   {
    3775             :     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_REGEX_FAILED,
    3776             :     .hint = gettext_noop ("An input did not match the regular expression."),
    3777             :     .http_code = MHD_HTTP_UNINITIALIZED
    3778             :   },
    3779             : 
    3780             :   {
    3781             :     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_VALIDATION_FAILED,
    3782             :     .hint = gettext_noop ("An input did not match the custom validation logic."),
    3783             :     .http_code = MHD_HTTP_UNINITIALIZED
    3784             :   },
    3785             : 
    3786             :   {
    3787             :     .ec = TALER_EC_ANASTASIS_REDUCER_POLICY_LOOKUP_FAILED,
    3788             :     .hint = gettext_noop ("Our attempts to download the recovery document failed with all providers. Most likely the personal information you entered differs from the information you provided during the backup process and you should go back to the previous step. Alternatively, if you used a backup provider that is unknown to this application, you should add that provider manually."),
    3789             :     .http_code = MHD_HTTP_UNINITIALIZED
    3790             :   },
    3791             : 
    3792             :   {
    3793             :     .ec = TALER_EC_ANASTASIS_REDUCER_BACKUP_PROVIDER_FAILED,
    3794             :     .hint = gettext_noop ("Anastasis provider reported a fatal failure."),
    3795             :     .http_code = MHD_HTTP_UNINITIALIZED
    3796             :   },
    3797             : 
    3798             :   {
    3799             :     .ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_CONFIG_FAILED,
    3800             :     .hint = gettext_noop ("Anastasis provider failed to respond to the configuration request."),
    3801             :     .http_code = MHD_HTTP_UNINITIALIZED
    3802             :   },
    3803             : 
    3804             :   {
    3805             :     .ec = TALER_EC_ANASTASIS_REDUCER_POLICY_MALFORMED,
    3806             :     .hint = gettext_noop ("The policy we downloaded is malformed. Must have been a client error while creating the backup."),
    3807             :     .http_code = MHD_HTTP_UNINITIALIZED
    3808             :   },
    3809             : 
    3810             :   {
    3811             :     .ec = TALER_EC_ANASTASIS_REDUCER_NETWORK_FAILED,
    3812             :     .hint = gettext_noop ("We failed to obtain the policy, likely due to a network issue."),
    3813             :     .http_code = MHD_HTTP_UNINITIALIZED
    3814             :   },
    3815             : 
    3816             :   {
    3817             :     .ec = TALER_EC_ANASTASIS_REDUCER_SECRET_MALFORMED,
    3818             :     .hint = gettext_noop ("The recovered secret did not match the required syntax."),
    3819             :     .http_code = MHD_HTTP_UNINITIALIZED
    3820             :   },
    3821             : 
    3822             :   {
    3823             :     .ec = TALER_EC_ANASTASIS_REDUCER_CHALLENGE_DATA_TOO_BIG,
    3824             :     .hint = gettext_noop ("The challenge data provided is too large for the available providers."),
    3825             :     .http_code = MHD_HTTP_UNINITIALIZED
    3826             :   },
    3827             : 
    3828             :   {
    3829             :     .ec = TALER_EC_ANASTASIS_REDUCER_SECRET_TOO_BIG,
    3830             :     .hint = gettext_noop ("The provided core secret is too large for some of the providers."),
    3831             :     .http_code = MHD_HTTP_UNINITIALIZED
    3832             :   },
    3833             : 
    3834             :   {
    3835             :     .ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_INVALID_CONFIG,
    3836             :     .hint = gettext_noop ("The provider returned in invalid configuration."),
    3837             :     .http_code = MHD_HTTP_UNINITIALIZED
    3838             :   },
    3839             : 
    3840             :   {
    3841             :     .ec = TALER_EC_ANASTASIS_REDUCER_INTERNAL_ERROR,
    3842             :     .hint = gettext_noop ("The reducer encountered an internal error, likely a bug that needs to be reported."),
    3843             :     .http_code = MHD_HTTP_UNINITIALIZED
    3844             :   },
    3845             : 
    3846             :   {
    3847             :     .ec = TALER_EC_ANASTASIS_REDUCER_PROVIDERS_ALREADY_SYNCED,
    3848             :     .hint = gettext_noop ("The reducer already synchronized with all providers."),
    3849             :     .http_code = MHD_HTTP_UNINITIALIZED
    3850             :   },
    3851             : 
    3852             :   {
    3853             :     .ec = TALER_EC_DONAU_GENERIC_KEYS_MISSING,
    3854             :     .hint = gettext_noop ("The Donau failed to perform the operation as it could not find the private keys. This is a problem with the Donau setup, not with the client's request."),
    3855             :     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
    3856             :   },
    3857             : 
    3858             :   {
    3859             :     .ec = TALER_EC_DONAU_CHARITY_SIGNATURE_INVALID,
    3860             :     .hint = gettext_noop ("The signature of the charity key is not valid."),
    3861             :     .http_code = MHD_HTTP_FORBIDDEN
    3862             :   },
    3863             : 
    3864             :   {
    3865             :     .ec = TALER_EC_DONAU_CHARITY_NOT_FOUND,
    3866             :     .hint = gettext_noop ("The charity is unknown."),
    3867             :     .http_code = MHD_HTTP_NOT_FOUND
    3868             :   },
    3869             : 
    3870             :   {
    3871             :     .ec = TALER_EC_DONAU_EXCEEDING_DONATION_LIMIT,
    3872             :     .hint = gettext_noop ("The donation amount specified in the request exceeds the limit of the charity."),
    3873             :     .http_code = MHD_HTTP_BAD_REQUEST
    3874             :   },
    3875             : 
    3876             :   {
    3877             :     .ec = TALER_EC_DONAU_GENERIC_DONATION_UNIT_UNKNOWN,
    3878             :     .hint = gettext_noop ("The Donau is not aware of the donation unit requested for the operation."),
    3879             :     .http_code = MHD_HTTP_NOT_FOUND
    3880             :   },
    3881             : 
    3882             :   {
    3883             :     .ec = TALER_EC_DONAU_DONATION_UNIT_HELPER_UNAVAILABLE,
    3884             :     .hint = gettext_noop ("The Donau failed to talk to the process responsible for its private donation unit keys or the helpers had no donation units (properly) configured."),
    3885             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3886             :   },
    3887             : 
    3888             :   {
    3889             :     .ec = TALER_EC_DONAU_SIGNKEY_HELPER_UNAVAILABLE,
    3890             :     .hint = gettext_noop ("The Donau failed to talk to the process responsible for its private signing keys."),
    3891             :     .http_code = MHD_HTTP_BAD_GATEWAY
    3892             :   },
    3893             : 
    3894             :   {
    3895             :     .ec = TALER_EC_DONAU_SIGNKEY_HELPER_BUG,
    3896             :     .hint = gettext_noop ("The response from the online signing key helper process was malformed."),
    3897             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3898             :   },
    3899             : 
    3900             :   {
    3901             :     .ec = TALER_EC_DONAU_GENERIC_WRONG_NUMBER_OF_SEGMENTS,
    3902             :     .hint = gettext_noop ("The number of segments included in the URI does not match the number of segments expected by the endpoint."),
    3903             :     .http_code = MHD_HTTP_NOT_FOUND
    3904             :   },
    3905             : 
    3906             :   {
    3907             :     .ec = TALER_EC_DONAU_DONATION_RECEIPT_SIGNATURE_INVALID,
    3908             :     .hint = gettext_noop ("The signature of the donation receipt is not valid."),
    3909             :     .http_code = MHD_HTTP_FORBIDDEN
    3910             :   },
    3911             : 
    3912             :   {
    3913             :     .ec = TALER_EC_DONAU_DONOR_IDENTIFIER_NONCE_REUSE,
    3914             :     .hint = gettext_noop ("The client reused a unique donor identifier nonce, which is not allowed."),
    3915             :     .http_code = MHD_HTTP_CONFLICT
    3916             :   },
    3917             : 
    3918             :   {
    3919             :     .ec = TALER_EC_LIBEUFIN_NEXUS_GENERIC_ERROR,
    3920             :     .hint = gettext_noop ("A generic error happened in the LibEuFin nexus.  See the enclose details JSON for more information."),
    3921             :     .http_code = MHD_HTTP_UNINITIALIZED
    3922             :   },
    3923             : 
    3924             :   {
    3925             :     .ec = TALER_EC_LIBEUFIN_NEXUS_UNCAUGHT_EXCEPTION,
    3926             :     .hint = gettext_noop ("An uncaught exception happened in the LibEuFin nexus service."),
    3927             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3928             :   },
    3929             : 
    3930             :   {
    3931             :     .ec = TALER_EC_LIBEUFIN_SANDBOX_GENERIC_ERROR,
    3932             :     .hint = gettext_noop ("A generic error happened in the LibEuFin sandbox.  See the enclose details JSON for more information."),
    3933             :     .http_code = MHD_HTTP_UNINITIALIZED
    3934             :   },
    3935             : 
    3936             :   {
    3937             :     .ec = TALER_EC_LIBEUFIN_SANDBOX_UNCAUGHT_EXCEPTION,
    3938             :     .hint = gettext_noop ("An uncaught exception happened in the LibEuFin sandbox service."),
    3939             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3940             :   },
    3941             : 
    3942             :   {
    3943             :     .ec = TALER_EC_TALDIR_METHOD_NOT_SUPPORTED,
    3944             :     .hint = gettext_noop ("This validation method is not supported by the service."),
    3945             :     .http_code = MHD_HTTP_NOT_FOUND
    3946             :   },
    3947             : 
    3948             :   {
    3949             :     .ec = TALER_EC_TALDIR_REGISTER_RATE_LIMITED,
    3950             :     .hint = gettext_noop ("Number of allowed attempts for initiating a challenge exceeded."),
    3951             :     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
    3952             :   },
    3953             : 
    3954             :   {
    3955             :     .ec = TALER_EC_CHALLENGER_GENERIC_CLIENT_UNKNOWN,
    3956             :     .hint = gettext_noop ("The client is unknown or unauthorized."),
    3957             :     .http_code = MHD_HTTP_NOT_FOUND
    3958             :   },
    3959             : 
    3960             :   {
    3961             :     .ec = TALER_EC_CHALLENGER_GENERIC_CLIENT_FORBIDDEN_BAD_REDIRECT_URI,
    3962             :     .hint = gettext_noop ("The client is not authorized to use the given redirect URI."),
    3963             :     .http_code = MHD_HTTP_FORBIDDEN
    3964             :   },
    3965             : 
    3966             :   {
    3967             :     .ec = TALER_EC_CHALLENGER_HELPER_EXEC_FAILED,
    3968             :     .hint = gettext_noop ("The service failed to execute its helper process to send the challenge."),
    3969             :     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    3970             :   },
    3971             : 
    3972             :   {
    3973             :     .ec = TALER_EC_CHALLENGER_GRANT_UNKNOWN,
    3974             :     .hint = gettext_noop ("The grant is unknown to the service (it could also have expired)."),
    3975             :     .http_code = MHD_HTTP_NOT_FOUND
    3976             :   },
    3977             : 
    3978             :   {
    3979             :     .ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE,
    3980             :     .hint = gettext_noop ("The code given is not even well-formed."),
    3981             :     .http_code = MHD_HTTP_FORBIDDEN
    3982             :   },
    3983             : 
    3984             :   {
    3985             :     .ec = TALER_EC_CHALLENGER_GENERIC_VALIDATION_UNKNOWN,
    3986             :     .hint = gettext_noop ("The service is not aware of the referenced validation process."),
    3987             :     .http_code = MHD_HTTP_NOT_FOUND
    3988             :   },
    3989             : 
    3990             :   {
    3991             :     .ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_INVALID_CODE,
    3992             :     .hint = gettext_noop ("The code given is not valid."),
    3993             :     .http_code = MHD_HTTP_FORBIDDEN
    3994             :   },
    3995             : 
    3996             :   {
    3997             :     .ec = TALER_EC_CHALLENGER_TOO_MANY_ATTEMPTS,
    3998             :     .hint = gettext_noop ("Too many attempts have been made, validation is temporarily disabled for this address."),
    3999             :     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
    4000             :   },
    4001             : 
    4002             :   {
    4003             :     .ec = TALER_EC_CHALLENGER_INVALID_PIN,
    4004             :     .hint = gettext_noop ("The PIN code provided is incorrect."),
    4005             :     .http_code = MHD_HTTP_FORBIDDEN
    4006             :   },
    4007             : 
    4008             :   {
    4009             :     .ec = TALER_EC_CHALLENGER_MISSING_ADDRESS,
    4010             :     .hint = gettext_noop ("The token cannot be valid as no address was ever provided by the client."),
    4011             :     .http_code = MHD_HTTP_CONFLICT
    4012             :   },
    4013             : 
    4014             :   {
    4015             :     .ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_READ_ONLY,
    4016             :     .hint = gettext_noop ("The client is not allowed to change the address being validated."),
    4017             :     .http_code = MHD_HTTP_FORBIDDEN
    4018             :   },
    4019             : 
    4020             :   {
    4021             :     .ec = TALER_EC_END,
    4022             :     .hint = gettext_noop ("End of error code range."),
    4023             :     .http_code = MHD_HTTP_UNINITIALIZED
    4024             :   },
    4025             : 
    4026             : 
    4027             : };
    4028             : 
    4029             : 
    4030             : /**
    4031             :  * The length of @e code_hint_pairs.
    4032             :  */
    4033             : static const unsigned int code_hint_pairs_length = 661;
    4034             : 
    4035             : 
    4036             : 
    4037             : const char *
    4038         101 : TALER_ErrorCode_get_hint (enum TALER_ErrorCode ec)
    4039             : {
    4040         101 :   unsigned int lower = 0;
    4041         101 :   unsigned int upper = code_hint_pairs_length - 1;
    4042         101 :   unsigned int mid = upper / 2;
    4043         846 :   while (lower <= upper)
    4044             :   {
    4045         846 :     mid = (upper + lower) / 2;
    4046         846 :     if (code_hint_pairs[mid].ec < ec)
    4047             :     {
    4048         319 :       lower = mid + 1;
    4049             :     }
    4050         527 :     else if (code_hint_pairs[mid].ec > ec)
    4051             :     {
    4052         426 :       upper = mid - 1;
    4053             :     }
    4054             :     else
    4055             :     {
    4056         101 :       return code_hint_pairs[mid].hint;
    4057             :     }
    4058             :   }
    4059           0 :   return "<no hint found>";
    4060             : }
    4061             : 
    4062             : 
    4063             : unsigned int
    4064          30 : TALER_ErrorCode_get_http_status (enum TALER_ErrorCode ec)
    4065             : {
    4066          30 :   unsigned int lower = 0;
    4067          30 :   unsigned int upper = code_hint_pairs_length - 1;
    4068          30 :   unsigned int mid = upper / 2;
    4069         249 :   while (lower <= upper)
    4070             :   {
    4071         249 :     mid = (upper + lower) / 2;
    4072         249 :     if (code_hint_pairs[mid].ec < ec)
    4073             :     {
    4074          97 :       lower = mid + 1;
    4075             :     }
    4076         152 :     else if (code_hint_pairs[mid].ec > ec)
    4077             :     {
    4078         122 :       upper = mid - 1;
    4079             :     }
    4080             :     else
    4081             :     {
    4082          30 :       return code_hint_pairs[mid].http_code;
    4083             :     }
    4084             :   }
    4085           0 :   return UINT_MAX;
    4086             : }
    4087             : 
    4088             : 
    4089             : unsigned int
    4090          29 : TALER_ErrorCode_get_http_status_safe (enum TALER_ErrorCode ec)
    4091             : {
    4092             :   unsigned int hc;
    4093             : 
    4094          29 :   hc = TALER_ErrorCode_get_http_status (ec);
    4095          29 :   if ( (0 == hc) ||
    4096             :        (UINT_MAX == hc) )
    4097           0 :     return MHD_HTTP_INTERNAL_SERVER_ERROR;
    4098          29 :   return hc;
    4099             : }

Generated by: LCOV version 1.16