exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

taler_error_codes.c (190186B)


      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 <gnunet/gnunet_util_lib.h>
     24 #include <taler/taler_error_codes.h>
     25 #include <stddef.h>
     26 #include <microhttpd.h>
     27 #include <gettext.h>
     28 
     29 /**
     30  * MHD does not define our value for 0 (client-side generated code).
     31  */
     32 #define MHD_HTTP_UNINITIALIZED 0
     33 
     34 /**
     35  * A pair containing an error code and its hint.
     36  */
     37 struct ErrorCodeAndHint
     38 {
     39   /**
     40    * The error code.
     41    */
     42   enum TALER_ErrorCode ec;
     43 
     44   /**
     45    * The hint.
     46    */
     47   const char *hint;
     48 
     49   /**
     50    * The HTTP status code.
     51    */
     52   unsigned int http_code;
     53 };
     54 
     55 
     56 /**
     57  * The list of all error codes with their hints.
     58  */
     59 static const struct ErrorCodeAndHint code_hint_pairs[] = {
     60 
     61   {
     62     /* 0 */
     63     .ec = TALER_EC_NONE,
     64     .hint = "Special code to indicate success (no error).",
     65     .http_code = MHD_HTTP_UNINITIALIZED
     66   },
     67 
     68   {
     69     /* 1 */
     70     .ec = TALER_EC_INVALID,
     71     .hint =
     72       "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.",
     73     .http_code = MHD_HTTP_UNINITIALIZED
     74   },
     75 
     76   {
     77     /* 2 */
     78     .ec = TALER_EC_GENERIC_CLIENT_INTERNAL_ERROR,
     79     .hint =
     80       "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.",
     81     .http_code = MHD_HTTP_UNINITIALIZED
     82   },
     83 
     84   {
     85     /* 3 */
     86     .ec = TALER_EC_GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION,
     87     .hint =
     88       "The client does not support the protocol version advertised by the server.",
     89     .http_code = MHD_HTTP_UNINITIALIZED
     90   },
     91 
     92   {
     93     /* 10 */
     94     .ec = TALER_EC_GENERIC_INVALID_RESPONSE,
     95     .hint =
     96       "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.",
     97     .http_code = MHD_HTTP_UNINITIALIZED
     98   },
     99 
    100   {
    101     /* 11 */
    102     .ec = TALER_EC_GENERIC_TIMEOUT,
    103     .hint =
    104       "The operation timed out. Trying again might help. Check the network connection.",
    105     .http_code = MHD_HTTP_UNINITIALIZED
    106   },
    107 
    108   {
    109     /* 12 */
    110     .ec = TALER_EC_GENERIC_VERSION_MALFORMED,
    111     .hint =
    112       "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.",
    113     .http_code = MHD_HTTP_UNINITIALIZED
    114   },
    115 
    116   {
    117     /* 13 */
    118     .ec = TALER_EC_GENERIC_REPLY_MALFORMED,
    119     .hint =
    120       "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.",
    121     .http_code = MHD_HTTP_UNINITIALIZED
    122   },
    123 
    124   {
    125     /* 14 */
    126     .ec = TALER_EC_GENERIC_CONFIGURATION_INVALID,
    127     .hint =
    128       "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.",
    129     .http_code = MHD_HTTP_UNINITIALIZED
    130   },
    131 
    132   {
    133     /* 15 */
    134     .ec = TALER_EC_GENERIC_UNEXPECTED_REQUEST_ERROR,
    135     .hint =
    136       "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.",
    137     .http_code = MHD_HTTP_UNINITIALIZED
    138   },
    139 
    140   {
    141     /* 16 */
    142     .ec = TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT,
    143     .hint =
    144       "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.",
    145     .http_code = MHD_HTTP_FORBIDDEN
    146   },
    147 
    148   {
    149     /* 20 */
    150     .ec = TALER_EC_GENERIC_METHOD_INVALID,
    151     .hint =
    152       "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.",
    153     .http_code = MHD_HTTP_METHOD_NOT_ALLOWED
    154   },
    155 
    156   {
    157     /* 21 */
    158     .ec = TALER_EC_GENERIC_ENDPOINT_UNKNOWN,
    159     .hint =
    160       "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.",
    161     .http_code = MHD_HTTP_NOT_FOUND
    162   },
    163 
    164   {
    165     /* 22 */
    166     .ec = TALER_EC_GENERIC_JSON_INVALID,
    167     .hint =
    168       "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.",
    169     .http_code = MHD_HTTP_BAD_REQUEST
    170   },
    171 
    172   {
    173     /* 23 */
    174     .ec = TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED,
    175     .hint =
    176       "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.",
    177     .http_code = MHD_HTTP_BAD_REQUEST
    178   },
    179 
    180   {
    181     /* 24 */
    182     .ec = TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
    183     .hint =
    184       "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.",
    185     .http_code = MHD_HTTP_BAD_REQUEST
    186   },
    187 
    188   {
    189     /* 25 */
    190     .ec = TALER_EC_GENERIC_PARAMETER_MISSING,
    191     .hint =
    192       "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.",
    193     .http_code = MHD_HTTP_BAD_REQUEST
    194   },
    195 
    196   {
    197     /* 26 */
    198     .ec = TALER_EC_GENERIC_PARAMETER_MALFORMED,
    199     .hint =
    200       "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.",
    201     .http_code = MHD_HTTP_BAD_REQUEST
    202   },
    203 
    204   {
    205     /* 27 */
    206     .ec = TALER_EC_GENERIC_RESERVE_PUB_MALFORMED,
    207     .hint = "The reserve public key was malformed.",
    208     .http_code = MHD_HTTP_BAD_REQUEST
    209   },
    210 
    211   {
    212     /* 28 */
    213     .ec = TALER_EC_GENERIC_COMPRESSION_INVALID,
    214     .hint =
    215       "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.",
    216     .http_code = MHD_HTTP_BAD_REQUEST
    217   },
    218 
    219   {
    220     /* 29 */
    221     .ec = TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED,
    222     .hint =
    223       "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.",
    224     .http_code = MHD_HTTP_BAD_REQUEST
    225   },
    226 
    227   {
    228     /* 30 */
    229     .ec = TALER_EC_GENERIC_CURRENCY_MISMATCH,
    230     .hint =
    231       "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.",
    232     .http_code = MHD_HTTP_BAD_REQUEST
    233   },
    234 
    235   {
    236     /* 31 */
    237     .ec = TALER_EC_GENERIC_URI_TOO_LONG,
    238     .hint =
    239       "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.",
    240     .http_code = MHD_HTTP_URI_TOO_LONG
    241   },
    242 
    243   {
    244     /* 32 */
    245     .ec = TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT,
    246     .hint =
    247       "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.",
    248     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
    249   },
    250 
    251   {
    252     /* 33 */
    253     .ec = TALER_EC_GENERIC_PARAMETER_EXTRA,
    254     .hint =
    255       "A parameter in the request was given that must not be present. 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.",
    256     .http_code = MHD_HTTP_BAD_REQUEST
    257   },
    258 
    259   {
    260     /* 40 */
    261     .ec = TALER_EC_GENERIC_UNAUTHORIZED,
    262     .hint =
    263       "The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner.",
    264     .http_code = MHD_HTTP_UNAUTHORIZED
    265   },
    266 
    267   {
    268     /* 41 */
    269     .ec = TALER_EC_GENERIC_TOKEN_UNKNOWN,
    270     .hint =
    271       "The service refused the request as the given authorization token is unknown. You should request a valid access token from the account owner.",
    272     .http_code = MHD_HTTP_UNAUTHORIZED
    273   },
    274 
    275   {
    276     /* 42 */
    277     .ec = TALER_EC_GENERIC_TOKEN_EXPIRED,
    278     .hint =
    279       "The service refused the request as the given authorization token expired. You should request a fresh authorization token from the account owner.",
    280     .http_code = MHD_HTTP_UNAUTHORIZED
    281   },
    282 
    283   {
    284     /* 43 */
    285     .ec = TALER_EC_GENERIC_TOKEN_MALFORMED,
    286     .hint =
    287       "The service refused the request as the given authorization token is invalid or malformed. You should check that you have the right credentials.",
    288     .http_code = MHD_HTTP_UNAUTHORIZED
    289   },
    290 
    291   {
    292     /* 44 */
    293     .ec = TALER_EC_GENERIC_FORBIDDEN,
    294     .hint =
    295       "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.",
    296     .http_code = MHD_HTTP_FORBIDDEN
    297   },
    298 
    299   {
    300     /* 50 */
    301     .ec = TALER_EC_GENERIC_DB_SETUP_FAILED,
    302     .hint =
    303       "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.",
    304     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    305   },
    306 
    307   {
    308     /* 51 */
    309     .ec = TALER_EC_GENERIC_DB_START_FAILED,
    310     .hint =
    311       "The service encountered an error event to just start the database transaction. The system administrator should check that the database is running.",
    312     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    313   },
    314 
    315   {
    316     /* 52 */
    317     .ec = TALER_EC_GENERIC_DB_STORE_FAILED,
    318     .hint =
    319       "The service failed to store information in its database. The system administrator should check that the database is running and review the service logs.",
    320     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    321   },
    322 
    323   {
    324     /* 53 */
    325     .ec = TALER_EC_GENERIC_DB_FETCH_FAILED,
    326     .hint =
    327       "The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs.",
    328     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    329   },
    330 
    331   {
    332     /* 54 */
    333     .ec = TALER_EC_GENERIC_DB_COMMIT_FAILED,
    334     .hint =
    335       "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.",
    336     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    337   },
    338 
    339   {
    340     /* 55 */
    341     .ec = TALER_EC_GENERIC_DB_SOFT_FAILURE,
    342     .hint =
    343       "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.",
    344     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    345   },
    346 
    347   {
    348     /* 56 */
    349     .ec = TALER_EC_GENERIC_DB_INVARIANT_FAILURE,
    350     .hint =
    351       "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.",
    352     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    353   },
    354 
    355   {
    356     /* 60 */
    357     .ec = TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE,
    358     .hint =
    359       "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.",
    360     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    361   },
    362 
    363   {
    364     /* 61 */
    365     .ec = TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH,
    366     .hint =
    367       "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.",
    368     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    369   },
    370 
    371   {
    372     /* 62 */
    373     .ec = TALER_EC_GENERIC_FAILED_COMPUTE_AMOUNT,
    374     .hint =
    375       "The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers.",
    376     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    377   },
    378 
    379   {
    380     /* 70 */
    381     .ec = TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY,
    382     .hint =
    383       "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.",
    384     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    385   },
    386 
    387   {
    388     /* 71 */
    389     .ec = TALER_EC_GENERIC_ALLOCATION_FAILURE,
    390     .hint =
    391       "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.",
    392     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    393   },
    394 
    395   {
    396     /* 72 */
    397     .ec = TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE,
    398     .hint =
    399       "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.",
    400     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    401   },
    402 
    403   {
    404     /* 73 */
    405     .ec = TALER_EC_GENERIC_CURL_ALLOCATION_FAILURE,
    406     .hint =
    407       "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.",
    408     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    409   },
    410 
    411   {
    412     /* 74 */
    413     .ec = TALER_EC_GENERIC_FAILED_TO_LOAD_TEMPLATE,
    414     .hint =
    415       "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.",
    416     .http_code = MHD_HTTP_NOT_ACCEPTABLE
    417   },
    418 
    419   {
    420     /* 75 */
    421     .ec = TALER_EC_GENERIC_FAILED_TO_EXPAND_TEMPLATE,
    422     .hint =
    423       "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.",
    424     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    425   },
    426 
    427   {
    428     /* 76 */
    429     .ec = TALER_EC_GENERIC_FEATURE_NOT_IMPLEMENTED,
    430     .hint =
    431       "The requested feature is not implemented by the server. The system administrator of the server may try to update the software or build it with other options to enable the feature.",
    432     .http_code = MHD_HTTP_NOT_IMPLEMENTED
    433   },
    434 
    435   {
    436     /* 77 */
    437     .ec = TALER_EC_GENERIC_OS_RESOURCE_ALLOCATION_FAILURE,
    438     .hint =
    439       "The operating system failed to allocate required resources. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate.",
    440     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    441   },
    442 
    443   {
    444     /* 78 */
    445     .ec = TALER_EC_GENERIC_REQUESTED_FORMAT_UNSUPPORTED,
    446     .hint =
    447       "The requested content type is not supported by the server. The client should try requesting a different format.",
    448     .http_code = MHD_HTTP_NOT_ACCEPTABLE
    449   },
    450 
    451   {
    452     /* 1000 */
    453     .ec = TALER_EC_EXCHANGE_GENERIC_BAD_CONFIGURATION,
    454     .hint = "Exchange is badly configured and thus cannot operate.",
    455     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    456   },
    457 
    458   {
    459     /* 1001 */
    460     .ec = TALER_EC_EXCHANGE_GENERIC_OPERATION_UNKNOWN,
    461     .hint = "Operation specified unknown for this endpoint.",
    462     .http_code = MHD_HTTP_NOT_FOUND
    463   },
    464 
    465   {
    466     /* 1002 */
    467     .ec = TALER_EC_EXCHANGE_GENERIC_WRONG_NUMBER_OF_SEGMENTS,
    468     .hint =
    469       "The number of segments included in the URI does not match the number of segments expected by the endpoint.",
    470     .http_code = MHD_HTTP_NOT_FOUND
    471   },
    472 
    473   {
    474     /* 1003 */
    475     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_DENOMINATION_KEY,
    476     .hint =
    477       "The same coin was already used with a different denomination previously.",
    478     .http_code = MHD_HTTP_CONFLICT
    479   },
    480 
    481   {
    482     /* 1004 */
    483     .ec = TALER_EC_EXCHANGE_GENERIC_COINS_INVALID_COIN_PUB,
    484     .hint =
    485       "The public key of given to a \"/coins/\" endpoint of the exchange was malformed.",
    486     .http_code = MHD_HTTP_BAD_REQUEST
    487   },
    488 
    489   {
    490     /* 1005 */
    491     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_KEY_UNKNOWN,
    492     .hint =
    493       "The exchange is not aware of the denomination key the wallet requested for the operation.",
    494     .http_code = MHD_HTTP_NOT_FOUND
    495   },
    496 
    497   {
    498     /* 1006 */
    499     .ec = TALER_EC_EXCHANGE_DENOMINATION_SIGNATURE_INVALID,
    500     .hint = "The signature of the denomination key over the coin is not valid.",
    501     .http_code = MHD_HTTP_FORBIDDEN
    502   },
    503 
    504   {
    505     /* 1007 */
    506     .ec = TALER_EC_EXCHANGE_GENERIC_KEYS_MISSING,
    507     .hint =
    508       "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.",
    509     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
    510   },
    511 
    512   {
    513     /* 1008 */
    514     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_VALIDITY_IN_FUTURE,
    515     .hint = "Validity period of the denomination lies in the future.",
    516     .http_code = MHD_HTTP_PRECONDITION_FAILED
    517   },
    518 
    519   {
    520     /* 1009 */
    521     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_EXPIRED,
    522     .hint =
    523       "Denomination key of the coin is past its expiration time for the requested operation.",
    524     .http_code = MHD_HTTP_GONE
    525   },
    526 
    527   {
    528     /* 1010 */
    529     .ec = TALER_EC_EXCHANGE_GENERIC_DENOMINATION_REVOKED,
    530     .hint = "Denomination key of the coin has been revoked.",
    531     .http_code = MHD_HTTP_GONE
    532   },
    533 
    534   {
    535     /* 1011 */
    536     .ec = TALER_EC_EXCHANGE_GENERIC_SECMOD_TIMEOUT,
    537     .hint =
    538       "An operation where the exchange interacted with a security module timed out.",
    539     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    540   },
    541 
    542   {
    543     /* 1012 */
    544     .ec = TALER_EC_EXCHANGE_GENERIC_INSUFFICIENT_FUNDS,
    545     .hint =
    546       "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\".",
    547     .http_code = MHD_HTTP_CONFLICT
    548   },
    549 
    550   {
    551     /* 1013 */
    552     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_HISTORY_COMPUTATION_FAILED,
    553     .hint =
    554       "The exchange had an internal error reconstructing the transaction history of the coin that was being processed.",
    555     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    556   },
    557 
    558   {
    559     /* 1014 */
    560     .ec = TALER_EC_EXCHANGE_GENERIC_HISTORY_DB_ERROR_INSUFFICIENT_FUNDS,
    561     .hint =
    562       "The exchange failed to obtain the transaction history of the given coin from the database while generating an insufficient funds errors.",
    563     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    564   },
    565 
    566   {
    567     /* 1015 */
    568     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_CONFLICTING_AGE_HASH,
    569     .hint =
    570       "The same coin was already used with a different age hash previously.",
    571     .http_code = MHD_HTTP_CONFLICT
    572   },
    573 
    574   {
    575     /* 1016 */
    576     .ec = TALER_EC_EXCHANGE_GENERIC_INVALID_DENOMINATION_CIPHER_FOR_OPERATION,
    577     .hint =
    578       "The requested operation is not valid for the cipher used by the selected denomination.",
    579     .http_code = MHD_HTTP_BAD_REQUEST
    580   },
    581 
    582   {
    583     /* 1017 */
    584     .ec = TALER_EC_EXCHANGE_GENERIC_CIPHER_MISMATCH,
    585     .hint =
    586       "The provided arguments for the operation use inconsistent ciphers.",
    587     .http_code = MHD_HTTP_BAD_REQUEST
    588   },
    589 
    590   {
    591     /* 1018 */
    592     .ec = TALER_EC_EXCHANGE_GENERIC_NEW_DENOMS_ARRAY_SIZE_EXCESSIVE,
    593     .hint =
    594       "The number of denominations specified in the request exceeds the limit of the exchange.",
    595     .http_code = MHD_HTTP_BAD_REQUEST
    596   },
    597 
    598   {
    599     /* 1019 */
    600     .ec = TALER_EC_EXCHANGE_GENERIC_COIN_UNKNOWN,
    601     .hint = "The coin is not known to the exchange (yet).",
    602     .http_code = MHD_HTTP_NOT_FOUND
    603   },
    604 
    605   {
    606     /* 1020 */
    607     .ec = TALER_EC_EXCHANGE_GENERIC_CLOCK_SKEW,
    608     .hint =
    609       "The time at the server is too far off from the time specified in the request. Most likely the client system time is wrong.",
    610     .http_code = MHD_HTTP_BAD_REQUEST
    611   },
    612 
    613   {
    614     /* 1021 */
    615     .ec = TALER_EC_EXCHANGE_GENERIC_AMOUNT_EXCEEDS_DENOMINATION_VALUE,
    616     .hint =
    617       "The specified amount for the coin is higher than the value of the denomination of the coin.",
    618     .http_code = MHD_HTTP_BAD_REQUEST
    619   },
    620 
    621   {
    622     /* 1022 */
    623     .ec = TALER_EC_EXCHANGE_GENERIC_GLOBAL_FEES_MISSING,
    624     .hint = "The exchange was not properly configured with global fees.",
    625     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    626   },
    627 
    628   {
    629     /* 1023 */
    630     .ec = TALER_EC_EXCHANGE_GENERIC_WIRE_FEES_MISSING,
    631     .hint = "The exchange was not properly configured with wire fees.",
    632     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    633   },
    634 
    635   {
    636     /* 1024 */
    637     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_PUB_MALFORMED,
    638     .hint = "The purse public key was malformed.",
    639     .http_code = MHD_HTTP_BAD_REQUEST
    640   },
    641 
    642   {
    643     /* 1025 */
    644     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_UNKNOWN,
    645     .hint = "The purse is unknown.",
    646     .http_code = MHD_HTTP_NOT_FOUND
    647   },
    648 
    649   {
    650     /* 1026 */
    651     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_EXPIRED,
    652     .hint = "The purse has expired.",
    653     .http_code = MHD_HTTP_GONE
    654   },
    655 
    656   {
    657     /* 1027 */
    658     .ec = TALER_EC_EXCHANGE_GENERIC_RESERVE_UNKNOWN,
    659     .hint =
    660       "The exchange has no information about the \"reserve_pub\" that was given.",
    661     .http_code = MHD_HTTP_NOT_FOUND
    662   },
    663 
    664   {
    665     /* 1028 */
    666     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_REQUIRED,
    667     .hint =
    668       "The exchange is not allowed to proceed with the operation until the client has satisfied a KYC check.",
    669     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
    670   },
    671 
    672   {
    673     /* 1029 */
    674     .ec =
    675       TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_CONFLICTING_ATTEST_VS_AGE_COMMITMENT,
    676     .hint =
    677       "Inconsistency between provided age commitment and attest: either none or both must be provided",
    678     .http_code = MHD_HTTP_BAD_REQUEST
    679   },
    680 
    681   {
    682     /* 1030 */
    683     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_AGE_ATTESTATION_FAILURE,
    684     .hint =
    685       "The provided attestation for the minimum age couldn't be verified by the exchange.",
    686     .http_code = MHD_HTTP_BAD_REQUEST
    687   },
    688 
    689   {
    690     /* 1031 */
    691     .ec = TALER_EC_EXCHANGE_GENERIC_PURSE_DELETED,
    692     .hint = "The purse was deleted.",
    693     .http_code = MHD_HTTP_GONE
    694   },
    695 
    696   {
    697     /* 1032 */
    698     .ec = TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_PUB_MALFORMED,
    699     .hint = "The public key of the AML officer in the URL was malformed.",
    700     .http_code = MHD_HTTP_BAD_REQUEST
    701   },
    702 
    703   {
    704     /* 1033 */
    705     .ec = TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_GET_SIGNATURE_INVALID,
    706     .hint =
    707       "The signature affirming the GET request of the AML officer is invalid.",
    708     .http_code = MHD_HTTP_FORBIDDEN
    709   },
    710 
    711   {
    712     /* 1034 */
    713     .ec = TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_ACCESS_DENIED,
    714     .hint = "The specified AML officer does not have access at this time.",
    715     .http_code = MHD_HTTP_FORBIDDEN
    716   },
    717 
    718   {
    719     /* 1035 */
    720     .ec = TALER_EC_EXCHANGE_GENERIC_AML_PENDING,
    721     .hint =
    722       "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.",
    723     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
    724   },
    725 
    726   {
    727     /* 1036 */
    728     .ec = TALER_EC_EXCHANGE_GENERIC_AML_FROZEN,
    729     .hint =
    730       "The requested operation is denied as the account was frozen on suspicion of money laundering. Please contact the exchange operator.",
    731     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
    732   },
    733 
    734   {
    735     /* 1037 */
    736     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_CONVERTER_FAILED,
    737     .hint =
    738       "The exchange failed to start a KYC attribute conversion helper process. It is likely configured incorrectly.",
    739     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    740   },
    741 
    742   {
    743     /* 1038 */
    744     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_FAILED,
    745     .hint =
    746       "The KYC operation failed. This could be because the KYC provider rejected the KYC data provided, or because the user aborted the KYC process.",
    747     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    748   },
    749 
    750   {
    751     /* 1039 */
    752     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_FAILED,
    753     .hint =
    754       "A fallback measure for a KYC operation failed. This is a bug. Users should contact the exchange operator.",
    755     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    756   },
    757 
    758   {
    759     /* 1040 */
    760     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_FALLBACK_UNKNOWN,
    761     .hint =
    762       "The specified fallback measure for a KYC operation is unknown. This is a bug. Users should contact the exchange operator.",
    763     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    764   },
    765 
    766   {
    767     /* 1041 */
    768     .ec = TALER_EC_EXCHANGE_GENERIC_BANK_ACCOUNT_UNKNOWN,
    769     .hint =
    770       "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.",
    771     .http_code = MHD_HTTP_NOT_FOUND
    772   },
    773 
    774   {
    775     /* 1042 */
    776     .ec = TALER_EC_EXCHANGE_GENERIC_AML_PROGRAM_RECURSION_DETECTED,
    777     .hint =
    778       "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.",
    779     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    780   },
    781 
    782   {
    783     /* 1043 */
    784     .ec = TALER_EC_EXCHANGE_GENERIC_KYC_SANCTION_LIST_CHECK_FAILED,
    785     .hint =
    786       "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.",
    787     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    788   },
    789 
    790   {
    791     /* 1044 */
    792     .ec = TALER_EC_EXCHANGE_GENERIC_TYPST_TEMPLATE_FAILURE,
    793     .hint =
    794       "The process to generate a PDF from a template failed. A likely cause is a syntactic error in the template. This needs to be investigated by the exchange operator.",
    795     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    796   },
    797 
    798   {
    799     /* 1045 */
    800     .ec = TALER_EC_EXCHANGE_GENERIC_PDFTK_FAILURE,
    801     .hint =
    802       "A process to combine multiple PDFs into one larger document failed. A likely cause is a resource exhaustion problem on the server. This needs to be investigated by the exchange operator.",
    803     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    804   },
    805 
    806   {
    807     /* 1046 */
    808     .ec = TALER_EC_EXCHANGE_GENERIC_TYPST_CRASH,
    809     .hint =
    810       "The process to generate a PDF from a template crashed. A likely cause is a bug in the Typst software. This needs to be investigated by the exchange operator.",
    811     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    812   },
    813 
    814   {
    815     /* 1047 */
    816     .ec = TALER_EC_EXCHANGE_GENERIC_PDFTK_CRASH,
    817     .hint =
    818       "The process to combine multiple PDFs into a larger document crashed. A likely cause is a bug in the pdftk software. This needs to be investigated by the exchange operator.",
    819     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    820   },
    821 
    822   {
    823     /* 1048 */
    824     .ec = TALER_EC_EXCHANGE_GENERIC_NO_TYPST_OR_PDFTK,
    825     .hint =
    826       "One of the binaries needed to generate the PDF is not installed. If this feature is required, the system administrator should make sure Typst and pdftk are both installed.",
    827     .http_code = MHD_HTTP_NOT_IMPLEMENTED
    828   },
    829 
    830   {
    831     /* 1049 */
    832     .ec = TALER_EC_EXCHANGE_GENERIC_TARGET_ACCOUNT_UNKNOWN,
    833     .hint =
    834       "The exchange is not aware of the given target account. The specified account is not a customer of this service.",
    835     .http_code = MHD_HTTP_NOT_FOUND
    836   },
    837 
    838   {
    839     /* 1050 */
    840     .ec = TALER_EC_EXCHANGE_GENERIC_AML_OFFICER_READ_ONLY,
    841     .hint =
    842       "The specified AML officer does not have write access at this time.",
    843     .http_code = MHD_HTTP_CONFLICT
    844   },
    845 
    846   {
    847     /* 1100 */
    848     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_NOT_FOUND,
    849     .hint =
    850       "The exchange did not find information about the specified transaction in the database.",
    851     .http_code = MHD_HTTP_NOT_FOUND
    852   },
    853 
    854   {
    855     /* 1101 */
    856     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_H_WIRE,
    857     .hint = "The wire hash of given to a \"/deposits/\" handler was malformed.",
    858     .http_code = MHD_HTTP_BAD_REQUEST
    859   },
    860 
    861   {
    862     /* 1102 */
    863     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_MERCHANT_PUB,
    864     .hint =
    865       "The merchant key of given to a \"/deposits/\" handler was malformed.",
    866     .http_code = MHD_HTTP_BAD_REQUEST
    867   },
    868 
    869   {
    870     /* 1103 */
    871     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_H_CONTRACT_TERMS,
    872     .hint =
    873       "The hash of the contract terms given to a \"/deposits/\" handler was malformed.",
    874     .http_code = MHD_HTTP_BAD_REQUEST
    875   },
    876 
    877   {
    878     /* 1104 */
    879     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_COIN_PUB,
    880     .hint =
    881       "The coin public key of given to a \"/deposits/\" handler was malformed.",
    882     .http_code = MHD_HTTP_BAD_REQUEST
    883   },
    884 
    885   {
    886     /* 1105 */
    887     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_INVALID_SIGNATURE_BY_EXCHANGE,
    888     .hint =
    889       "The signature returned by the exchange in a /deposits/ request was malformed.",
    890     .http_code = MHD_HTTP_UNINITIALIZED
    891   },
    892 
    893   {
    894     /* 1106 */
    895     .ec = TALER_EC_EXCHANGE_DEPOSITS_GET_MERCHANT_SIGNATURE_INVALID,
    896     .hint = "The signature of the merchant is invalid.",
    897     .http_code = MHD_HTTP_FORBIDDEN
    898   },
    899 
    900   {
    901     /* 1107 */
    902     .ec = TALER_EC_EXCHANGE_DEPOSITS_POLICY_NOT_ACCEPTED,
    903     .hint = "The provided policy data was not accepted",
    904     .http_code = MHD_HTTP_BAD_REQUEST
    905   },
    906 
    907   {
    908     /* 1150 */
    909     .ec = TALER_EC_EXCHANGE_WITHDRAW_INSUFFICIENT_FUNDS,
    910     .hint =
    911       "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.",
    912     .http_code = MHD_HTTP_CONFLICT
    913   },
    914 
    915   {
    916     /* 1151 */
    917     .ec = TALER_EC_EXCHANGE_AGE_WITHDRAW_INSUFFICIENT_FUNDS,
    918     .hint =
    919       "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.",
    920     .http_code = MHD_HTTP_CONFLICT
    921   },
    922 
    923   {
    924     /* 1152 */
    925     .ec = TALER_EC_EXCHANGE_WITHDRAW_AMOUNT_FEE_OVERFLOW,
    926     .hint =
    927       "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.",
    928     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    929   },
    930 
    931   {
    932     /* 1153 */
    933     .ec = TALER_EC_EXCHANGE_WITHDRAW_SIGNATURE_FAILED,
    934     .hint =
    935       "The exchange failed to create the signature using the denomination key.",
    936     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    937   },
    938 
    939   {
    940     /* 1154 */
    941     .ec = TALER_EC_EXCHANGE_WITHDRAW_RESERVE_SIGNATURE_INVALID,
    942     .hint = "The signature of the reserve is not valid.",
    943     .http_code = MHD_HTTP_FORBIDDEN
    944   },
    945 
    946   {
    947     /* 1155 */
    948     .ec = TALER_EC_EXCHANGE_RESERVE_HISTORY_ERROR_INSUFFICIENT_FUNDS,
    949     .hint =
    950       "When computing the reserve history, we ended up with a negative overall balance, which should be impossible.",
    951     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
    952   },
    953 
    954   {
    955     /* 1156 */
    956     .ec = TALER_EC_EXCHANGE_GET_RESERVE_HISTORY_ERROR_INSUFFICIENT_BALANCE,
    957     .hint =
    958       "The reserve did not have sufficient funds in it to pay for a full reserve history statement.",
    959     .http_code = MHD_HTTP_CONFLICT
    960   },
    961 
    962   {
    963     /* 1158 */
    964     .ec = TALER_EC_EXCHANGE_WITHDRAW_DENOMINATION_KEY_LOST,
    965     .hint = "Withdraw period of the coin to be withdrawn is in the past.",
    966     .http_code = MHD_HTTP_GONE
    967   },
    968 
    969   {
    970     /* 1159 */
    971     .ec = TALER_EC_EXCHANGE_WITHDRAW_UNBLIND_FAILURE,
    972     .hint = "The client failed to unblind the blind signature.",
    973     .http_code = MHD_HTTP_UNINITIALIZED
    974   },
    975 
    976   {
    977     /* 1160 */
    978     .ec = TALER_EC_EXCHANGE_WITHDRAW_NONCE_REUSE,
    979     .hint = "The client reused a withdraw nonce, which is not allowed.",
    980     .http_code = MHD_HTTP_CONFLICT
    981   },
    982 
    983   {
    984     /* 1161 */
    985     .ec = TALER_EC_EXCHANGE_WITHDRAW_COMMITMENT_UNKNOWN,
    986     .hint =
    987       "The client provided an unknown commitment for an age-withdraw request.",
    988     .http_code = MHD_HTTP_BAD_REQUEST
    989   },
    990 
    991   {
    992     /* 1162 */
    993     .ec = TALER_EC_EXCHANGE_WITHDRAW_AMOUNT_OVERFLOW,
    994     .hint = "The total sum of amounts from the denominations did overflow.",
    995     .http_code = MHD_HTTP_BAD_REQUEST
    996   },
    997 
    998   {
    999     /* 1163 */
   1000     .ec = TALER_EC_EXCHANGE_AGE_WITHDRAW_AMOUNT_INCORRECT,
   1001     .hint =
   1002       "The total sum of value and fees from the denominations differs from the committed amount with fees.",
   1003     .http_code = MHD_HTTP_BAD_REQUEST
   1004   },
   1005 
   1006   {
   1007     /* 1164 */
   1008     .ec = TALER_EC_EXCHANGE_WITHDRAW_REVEAL_INVALID_HASH,
   1009     .hint = "The original commitment differs from the calculated hash",
   1010     .http_code = MHD_HTTP_BAD_REQUEST
   1011   },
   1012 
   1013   {
   1014     /* 1165 */
   1015     .ec = TALER_EC_EXCHANGE_WITHDRAW_MAXIMUM_AGE_TOO_LARGE,
   1016     .hint = "The maximum age in the commitment is too large for the reserve",
   1017     .http_code = MHD_HTTP_CONFLICT
   1018   },
   1019 
   1020   {
   1021     /* 1175 */
   1022     .ec = TALER_EC_EXCHANGE_WITHDRAW_IDEMPOTENT_PLANCHET,
   1023     .hint =
   1024       "The withdraw operation included the same planchet more than once. This is not allowed.",
   1025     .http_code = MHD_HTTP_BAD_REQUEST
   1026   },
   1027 
   1028   {
   1029     /* 1205 */
   1030     .ec = TALER_EC_EXCHANGE_DEPOSIT_COIN_SIGNATURE_INVALID,
   1031     .hint =
   1032       "The signature made by the coin over the deposit permission is not valid.",
   1033     .http_code = MHD_HTTP_FORBIDDEN
   1034   },
   1035 
   1036   {
   1037     /* 1206 */
   1038     .ec = TALER_EC_EXCHANGE_DEPOSIT_CONFLICTING_CONTRACT,
   1039     .hint =
   1040       "The same coin was already deposited for the same merchant and contract with other details.",
   1041     .http_code = MHD_HTTP_CONFLICT
   1042   },
   1043 
   1044   {
   1045     /* 1207 */
   1046     .ec = TALER_EC_EXCHANGE_DEPOSIT_NEGATIVE_VALUE_AFTER_FEE,
   1047     .hint =
   1048       "The stated value of the coin after the deposit fee is subtracted would be negative.",
   1049     .http_code = MHD_HTTP_BAD_REQUEST
   1050   },
   1051 
   1052   {
   1053     /* 1208 */
   1054     .ec = TALER_EC_EXCHANGE_DEPOSIT_REFUND_DEADLINE_AFTER_WIRE_DEADLINE,
   1055     .hint = "The stated refund deadline is after the wire deadline.",
   1056     .http_code = MHD_HTTP_BAD_REQUEST
   1057   },
   1058 
   1059   {
   1060     /* 1209 */
   1061     .ec = TALER_EC_EXCHANGE_DEPOSIT_WIRE_DEADLINE_IS_NEVER,
   1062     .hint = "The stated wire deadline is \"never\", which makes no sense.",
   1063     .http_code = MHD_HTTP_BAD_REQUEST
   1064   },
   1065 
   1066   {
   1067     /* 1210 */
   1068     .ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_JSON,
   1069     .hint =
   1070       "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.",
   1071     .http_code = MHD_HTTP_BAD_REQUEST
   1072   },
   1073 
   1074   {
   1075     /* 1211 */
   1076     .ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_WIRE_FORMAT_CONTRACT_HASH_CONFLICT,
   1077     .hint =
   1078       "The hash of the given wire address does not match the wire hash specified in the proposal data.",
   1079     .http_code = MHD_HTTP_BAD_REQUEST
   1080   },
   1081 
   1082   {
   1083     /* 1221 */
   1084     .ec = TALER_EC_EXCHANGE_DEPOSIT_INVALID_SIGNATURE_BY_EXCHANGE,
   1085     .hint = "The signature provided by the exchange is not valid.",
   1086     .http_code = MHD_HTTP_UNINITIALIZED
   1087   },
   1088 
   1089   {
   1090     /* 1222 */
   1091     .ec = TALER_EC_EXCHANGE_DEPOSIT_FEE_ABOVE_AMOUNT,
   1092     .hint =
   1093       "The deposited amount is smaller than the deposit fee, which would result in a negative contribution.",
   1094     .http_code = MHD_HTTP_BAD_REQUEST
   1095   },
   1096 
   1097   {
   1098     /* 1240 */
   1099     .ec = TALER_EC_EXCHANGE_EXTENSIONS_INVALID_FULFILLMENT,
   1100     .hint = "The proof of policy fulfillment was invalid.",
   1101     .http_code = MHD_HTTP_BAD_REQUEST
   1102   },
   1103 
   1104   {
   1105     /* 1251 */
   1106     .ec = TALER_EC_EXCHANGE_COIN_HISTORY_BAD_SIGNATURE,
   1107     .hint = "The coin history was requested with a bad signature.",
   1108     .http_code = MHD_HTTP_FORBIDDEN
   1109   },
   1110 
   1111   {
   1112     /* 1252 */
   1113     .ec = TALER_EC_EXCHANGE_RESERVE_HISTORY_BAD_SIGNATURE,
   1114     .hint = "The reserve history was requested with a bad signature.",
   1115     .http_code = MHD_HTTP_FORBIDDEN
   1116   },
   1117 
   1118   {
   1119     /* 1302 */
   1120     .ec = TALER_EC_EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION,
   1121     .hint =
   1122       "The exchange encountered melt fees exceeding the melted coin's contribution.",
   1123     .http_code = MHD_HTTP_BAD_REQUEST
   1124   },
   1125 
   1126   {
   1127     /* 1303 */
   1128     .ec = TALER_EC_EXCHANGE_MELT_COIN_SIGNATURE_INVALID,
   1129     .hint = "The signature made with the coin to be melted is invalid.",
   1130     .http_code = MHD_HTTP_FORBIDDEN
   1131   },
   1132 
   1133   {
   1134     /* 1305 */
   1135     .ec = TALER_EC_EXCHANGE_MELT_COIN_EXPIRED_NO_ZOMBIE,
   1136     .hint =
   1137       "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).",
   1138     .http_code = MHD_HTTP_BAD_REQUEST
   1139   },
   1140 
   1141   {
   1142     /* 1306 */
   1143     .ec = TALER_EC_EXCHANGE_MELT_INVALID_SIGNATURE_BY_EXCHANGE,
   1144     .hint =
   1145       "The signature returned by the exchange in a melt request was malformed.",
   1146     .http_code = MHD_HTTP_UNINITIALIZED
   1147   },
   1148 
   1149   {
   1150     /* 1353 */
   1151     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_COMMITMENT_VIOLATION,
   1152     .hint =
   1153       "The provided transfer keys do not match up with the original commitment.  Information about the original commitment is included in the response.",
   1154     .http_code = MHD_HTTP_CONFLICT
   1155   },
   1156 
   1157   {
   1158     /* 1354 */
   1159     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_SIGNING_ERROR,
   1160     .hint =
   1161       "Failed to produce the blinded signatures over the coins to be returned.",
   1162     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1163   },
   1164 
   1165   {
   1166     /* 1355 */
   1167     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_SESSION_UNKNOWN,
   1168     .hint =
   1169       "The exchange is unaware of the refresh session specified in the request.",
   1170     .http_code = MHD_HTTP_NOT_FOUND
   1171   },
   1172 
   1173   {
   1174     /* 1356 */
   1175     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_CNC_TRANSFER_ARRAY_SIZE_INVALID,
   1176     .hint =
   1177       "The size of the cut-and-choose dimension of the private transfer keys request does not match #TALER_CNC_KAPPA - 1.",
   1178     .http_code = MHD_HTTP_BAD_REQUEST
   1179   },
   1180 
   1181   {
   1182     /* 1358 */
   1183     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_NEW_DENOMS_ARRAY_SIZE_MISMATCH,
   1184     .hint =
   1185       "The number of envelopes given does not match the number of denomination keys given.",
   1186     .http_code = MHD_HTTP_BAD_REQUEST
   1187   },
   1188 
   1189   {
   1190     /* 1359 */
   1191     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_COST_CALCULATION_OVERFLOW,
   1192     .hint =
   1193       "The exchange encountered a numeric overflow totaling up the cost for the refresh operation.",
   1194     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1195   },
   1196 
   1197   {
   1198     /* 1360 */
   1199     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_AMOUNT_INSUFFICIENT,
   1200     .hint =
   1201       "The exchange's cost calculation shows that the melt amount is below the costs of the transaction.",
   1202     .http_code = MHD_HTTP_BAD_REQUEST
   1203   },
   1204 
   1205   {
   1206     /* 1361 */
   1207     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_LINK_SIGNATURE_INVALID,
   1208     .hint = "The signature made with the coin over the link data is invalid.",
   1209     .http_code = MHD_HTTP_FORBIDDEN
   1210   },
   1211 
   1212   {
   1213     /* 1362 */
   1214     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_INVALID_RCH,
   1215     .hint =
   1216       "The refresh session hash given to a /refreshes/ handler was malformed.",
   1217     .http_code = MHD_HTTP_BAD_REQUEST
   1218   },
   1219 
   1220   {
   1221     /* 1363 */
   1222     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_OPERATION_INVALID,
   1223     .hint = "Operation specified invalid for this endpoint.",
   1224     .http_code = MHD_HTTP_BAD_REQUEST
   1225   },
   1226 
   1227   {
   1228     /* 1364 */
   1229     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_NOT_SUPPORTED,
   1230     .hint =
   1231       "The client provided age commitment data, but age restriction is not supported on this server.",
   1232     .http_code = MHD_HTTP_BAD_REQUEST
   1233   },
   1234 
   1235   {
   1236     /* 1365 */
   1237     .ec = TALER_EC_EXCHANGE_REFRESHES_REVEAL_AGE_RESTRICTION_COMMITMENT_INVALID,
   1238     .hint =
   1239       "The client provided invalid age commitment data: missing, not an array, or  array of invalid size.",
   1240     .http_code = MHD_HTTP_BAD_REQUEST
   1241   },
   1242 
   1243   {
   1244     /* 1400 */
   1245     .ec = TALER_EC_EXCHANGE_LINK_COIN_UNKNOWN,
   1246     .hint =
   1247       "The coin specified in the link request is unknown to the exchange.",
   1248     .http_code = MHD_HTTP_NOT_FOUND
   1249   },
   1250 
   1251   {
   1252     /* 1450 */
   1253     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_MALFORMED,
   1254     .hint = "The public key of given to a /transfers/ handler was malformed.",
   1255     .http_code = MHD_HTTP_BAD_REQUEST
   1256   },
   1257 
   1258   {
   1259     /* 1451 */
   1260     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WTID_NOT_FOUND,
   1261     .hint =
   1262       "The exchange did not find information about the specified wire transfer identifier in the database.",
   1263     .http_code = MHD_HTTP_NOT_FOUND
   1264   },
   1265 
   1266   {
   1267     /* 1452 */
   1268     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_NOT_FOUND,
   1269     .hint =
   1270       "The exchange did not find information about the wire transfer fees it charged.",
   1271     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1272   },
   1273 
   1274   {
   1275     /* 1453 */
   1276     .ec = TALER_EC_EXCHANGE_TRANSFERS_GET_WIRE_FEE_INCONSISTENT,
   1277     .hint =
   1278       "The exchange found a wire fee that was above the total transfer value (and thus could not have been charged).",
   1279     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1280   },
   1281 
   1282   {
   1283     /* 1475 */
   1284     .ec = TALER_EC_EXCHANGE_PURSES_INVALID_WAIT_TARGET,
   1285     .hint = "The wait target of the URL was not in the set of expected values.",
   1286     .http_code = MHD_HTTP_BAD_REQUEST
   1287   },
   1288 
   1289   {
   1290     /* 1476 */
   1291     .ec = TALER_EC_EXCHANGE_PURSES_GET_INVALID_SIGNATURE_BY_EXCHANGE,
   1292     .hint =
   1293       "The signature on the purse status returned by the exchange was invalid.",
   1294     .http_code = MHD_HTTP_UNINITIALIZED
   1295   },
   1296 
   1297   {
   1298     /* 1500 */
   1299     .ec = TALER_EC_EXCHANGE_REFUND_COIN_NOT_FOUND,
   1300     .hint =
   1301       "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.",
   1302     .http_code = MHD_HTTP_NOT_FOUND
   1303   },
   1304 
   1305   {
   1306     /* 1501 */
   1307     .ec = TALER_EC_EXCHANGE_REFUND_CONFLICT_DEPOSIT_INSUFFICIENT,
   1308     .hint =
   1309       "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.",
   1310     .http_code = MHD_HTTP_CONFLICT
   1311   },
   1312 
   1313   {
   1314     /* 1502 */
   1315     .ec = TALER_EC_EXCHANGE_REFUND_DEPOSIT_NOT_FOUND,
   1316     .hint =
   1317       "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).",
   1318     .http_code = MHD_HTTP_NOT_FOUND
   1319   },
   1320 
   1321   {
   1322     /* 1503 */
   1323     .ec = TALER_EC_EXCHANGE_REFUND_MERCHANT_ALREADY_PAID,
   1324     .hint =
   1325       "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.)",
   1326     .http_code = MHD_HTTP_GONE
   1327   },
   1328 
   1329   {
   1330     /* 1504 */
   1331     .ec = TALER_EC_EXCHANGE_REFUND_FEE_TOO_LOW,
   1332     .hint =
   1333       "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.",
   1334     .http_code = MHD_HTTP_BAD_REQUEST
   1335   },
   1336 
   1337   {
   1338     /* 1505 */
   1339     .ec = TALER_EC_EXCHANGE_REFUND_FEE_ABOVE_AMOUNT,
   1340     .hint =
   1341       "The refunded amount is smaller than the refund fee, which would result in a negative refund.",
   1342     .http_code = MHD_HTTP_BAD_REQUEST
   1343   },
   1344 
   1345   {
   1346     /* 1506 */
   1347     .ec = TALER_EC_EXCHANGE_REFUND_MERCHANT_SIGNATURE_INVALID,
   1348     .hint = "The signature of the merchant is invalid.",
   1349     .http_code = MHD_HTTP_FORBIDDEN
   1350   },
   1351 
   1352   {
   1353     /* 1507 */
   1354     .ec = TALER_EC_EXCHANGE_REFUND_MERCHANT_SIGNING_FAILED,
   1355     .hint =
   1356       "Merchant backend failed to create the refund confirmation signature.",
   1357     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1358   },
   1359 
   1360   {
   1361     /* 1508 */
   1362     .ec = TALER_EC_EXCHANGE_REFUND_INVALID_SIGNATURE_BY_EXCHANGE,
   1363     .hint =
   1364       "The signature returned by the exchange in a refund request was malformed.",
   1365     .http_code = MHD_HTTP_UNINITIALIZED
   1366   },
   1367 
   1368   {
   1369     /* 1509 */
   1370     .ec = TALER_EC_EXCHANGE_REFUND_INVALID_FAILURE_PROOF_BY_EXCHANGE,
   1371     .hint = "The failure proof returned by the exchange is incorrect.",
   1372     .http_code = MHD_HTTP_UNINITIALIZED
   1373   },
   1374 
   1375   {
   1376     /* 1510 */
   1377     .ec = TALER_EC_EXCHANGE_REFUND_INCONSISTENT_AMOUNT,
   1378     .hint =
   1379       "Conflicting refund granted before with different amount but same refund transaction ID.",
   1380     .http_code = MHD_HTTP_FAILED_DEPENDENCY
   1381   },
   1382 
   1383   {
   1384     /* 1550 */
   1385     .ec = TALER_EC_EXCHANGE_RECOUP_SIGNATURE_INVALID,
   1386     .hint = "The given coin signature is invalid for the request.",
   1387     .http_code = MHD_HTTP_FORBIDDEN
   1388   },
   1389 
   1390   {
   1391     /* 1551 */
   1392     .ec = TALER_EC_EXCHANGE_RECOUP_WITHDRAW_NOT_FOUND,
   1393     .hint =
   1394       "The exchange could not find the corresponding withdraw operation. The request is denied.",
   1395     .http_code = MHD_HTTP_NOT_FOUND
   1396   },
   1397 
   1398   {
   1399     /* 1552 */
   1400     .ec = TALER_EC_EXCHANGE_RECOUP_COIN_BALANCE_ZERO,
   1401     .hint = "The coin's remaining balance is zero.  The request is denied.",
   1402     .http_code = MHD_HTTP_FORBIDDEN
   1403   },
   1404 
   1405   {
   1406     /* 1553 */
   1407     .ec = TALER_EC_EXCHANGE_RECOUP_BLINDING_FAILED,
   1408     .hint = "The exchange failed to reproduce the coin's blinding.",
   1409     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1410   },
   1411 
   1412   {
   1413     /* 1554 */
   1414     .ec = TALER_EC_EXCHANGE_RECOUP_COIN_BALANCE_NEGATIVE,
   1415     .hint = "The coin's remaining balance is zero.  The request is denied.",
   1416     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1417   },
   1418 
   1419   {
   1420     /* 1555 */
   1421     .ec = TALER_EC_EXCHANGE_RECOUP_NOT_ELIGIBLE,
   1422     .hint = "The coin's denomination has not been revoked yet.",
   1423     .http_code = MHD_HTTP_NOT_FOUND
   1424   },
   1425 
   1426   {
   1427     /* 1575 */
   1428     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_SIGNATURE_INVALID,
   1429     .hint = "The given coin signature is invalid for the request.",
   1430     .http_code = MHD_HTTP_FORBIDDEN
   1431   },
   1432 
   1433   {
   1434     /* 1576 */
   1435     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_MELT_NOT_FOUND,
   1436     .hint =
   1437       "The exchange could not find the corresponding melt operation. The request is denied.",
   1438     .http_code = MHD_HTTP_NOT_FOUND
   1439   },
   1440 
   1441   {
   1442     /* 1578 */
   1443     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_BLINDING_FAILED,
   1444     .hint = "The exchange failed to reproduce the coin's blinding.",
   1445     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1446   },
   1447 
   1448   {
   1449     /* 1580 */
   1450     .ec = TALER_EC_EXCHANGE_RECOUP_REFRESH_NOT_ELIGIBLE,
   1451     .hint = "The coin's denomination has not been revoked yet.",
   1452     .http_code = MHD_HTTP_NOT_FOUND
   1453   },
   1454 
   1455   {
   1456     /* 1600 */
   1457     .ec = TALER_EC_EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN,
   1458     .hint =
   1459       "This exchange does not allow clients to request /keys for times other than the current (exchange) time.",
   1460     .http_code = MHD_HTTP_FORBIDDEN
   1461   },
   1462 
   1463   {
   1464     /* 1650 */
   1465     .ec = TALER_EC_EXCHANGE_WIRE_SIGNATURE_INVALID,
   1466     .hint = "A signature in the server's response was malformed.",
   1467     .http_code = MHD_HTTP_UNINITIALIZED
   1468   },
   1469 
   1470   {
   1471     /* 1651 */
   1472     .ec = TALER_EC_EXCHANGE_WIRE_NO_ACCOUNTS_CONFIGURED,
   1473     .hint =
   1474       "No bank accounts are enabled for the exchange. The administrator should enable-account using the taler-exchange-offline tool.",
   1475     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1476   },
   1477 
   1478   {
   1479     /* 1652 */
   1480     .ec = TALER_EC_EXCHANGE_WIRE_INVALID_PAYTO_CONFIGURED,
   1481     .hint =
   1482       "The payto:// URI stored in the exchange database for its bank account is malformed.",
   1483     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1484   },
   1485 
   1486   {
   1487     /* 1653 */
   1488     .ec = TALER_EC_EXCHANGE_WIRE_FEES_NOT_CONFIGURED,
   1489     .hint =
   1490       "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.",
   1491     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1492   },
   1493 
   1494   {
   1495     /* 1675 */
   1496     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_CREATE_CONFLICTING_META_DATA,
   1497     .hint = "This purse was previously created with different meta data.",
   1498     .http_code = MHD_HTTP_CONFLICT
   1499   },
   1500 
   1501   {
   1502     /* 1676 */
   1503     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_CONFLICTING_META_DATA,
   1504     .hint = "This purse was previously merged with different meta data.",
   1505     .http_code = MHD_HTTP_CONFLICT
   1506   },
   1507 
   1508   {
   1509     /* 1677 */
   1510     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_CREATE_INSUFFICIENT_FUNDS,
   1511     .hint = "The reserve has insufficient funds to create another purse.",
   1512     .http_code = MHD_HTTP_CONFLICT
   1513   },
   1514 
   1515   {
   1516     /* 1678 */
   1517     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_FEE_TOO_LOW,
   1518     .hint =
   1519       "The purse fee specified for the request is lower than the purse fee charged by the exchange at this time.",
   1520     .http_code = MHD_HTTP_BAD_REQUEST
   1521   },
   1522 
   1523   {
   1524     /* 1679 */
   1525     .ec = TALER_EC_EXCHANGE_PURSE_DELETE_ALREADY_DECIDED,
   1526     .hint =
   1527       "The payment request cannot be deleted anymore, as it either already completed or timed out.",
   1528     .http_code = MHD_HTTP_CONFLICT
   1529   },
   1530 
   1531   {
   1532     /* 1680 */
   1533     .ec = TALER_EC_EXCHANGE_PURSE_DELETE_SIGNATURE_INVALID,
   1534     .hint = "The signature affirming the purse deletion is invalid.",
   1535     .http_code = MHD_HTTP_FORBIDDEN
   1536   },
   1537 
   1538   {
   1539     /* 1681 */
   1540     .ec = TALER_EC_EXCHANGE_RESERVES_AGE_RESTRICTION_REQUIRED,
   1541     .hint = "Withdrawal from the reserve requires age restriction to be set.",
   1542     .http_code = MHD_HTTP_FORBIDDEN
   1543   },
   1544 
   1545   {
   1546     /* 1700 */
   1547     .ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_UNAVAILABLE,
   1548     .hint =
   1549       "The exchange failed to talk to the process responsible for its private denomination keys or the helpers had no denominations (properly) configured.",
   1550     .http_code = MHD_HTTP_BAD_GATEWAY
   1551   },
   1552 
   1553   {
   1554     /* 1701 */
   1555     .ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_BUG,
   1556     .hint =
   1557       "The response from the denomination key helper process was malformed.",
   1558     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1559   },
   1560 
   1561   {
   1562     /* 1702 */
   1563     .ec = TALER_EC_EXCHANGE_DENOMINATION_HELPER_TOO_EARLY,
   1564     .hint =
   1565       "The helper refuses to sign with the key, because it is too early: the validity period has not yet started.",
   1566     .http_code = MHD_HTTP_BAD_REQUEST
   1567   },
   1568 
   1569   {
   1570     /* 1725 */
   1571     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_EXCHANGE_SIGNATURE_INVALID,
   1572     .hint = "The signature of the exchange on the reply was invalid.",
   1573     .http_code = MHD_HTTP_UNINITIALIZED
   1574   },
   1575 
   1576   {
   1577     /* 1750 */
   1578     .ec = TALER_EC_EXCHANGE_SIGNKEY_HELPER_UNAVAILABLE,
   1579     .hint =
   1580       "The exchange failed to talk to the process responsible for its private signing keys.",
   1581     .http_code = MHD_HTTP_BAD_GATEWAY
   1582   },
   1583 
   1584   {
   1585     /* 1751 */
   1586     .ec = TALER_EC_EXCHANGE_SIGNKEY_HELPER_BUG,
   1587     .hint =
   1588       "The response from the online signing key helper process was malformed.",
   1589     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1590   },
   1591 
   1592   {
   1593     /* 1752 */
   1594     .ec = TALER_EC_EXCHANGE_SIGNKEY_HELPER_TOO_EARLY,
   1595     .hint =
   1596       "The helper refuses to sign with the key, because it is too early: the validity period has not yet started.",
   1597     .http_code = MHD_HTTP_BAD_REQUEST
   1598   },
   1599 
   1600   {
   1601     /* 1753 */
   1602     .ec = TALER_EC_EXCHANGE_SIGNKEY_HELPER_OFFLINE_MISSING,
   1603     .hint =
   1604       "The signatures from the master exchange public key are missing, thus the exchange cannot currently sign its API responses. The exchange operator must use taler-exchange-offline to sign the current key material.",
   1605     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   1606   },
   1607 
   1608   {
   1609     /* 1775 */
   1610     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_BEFORE_NOW,
   1611     .hint =
   1612       "The purse expiration time is in the past at the time of its creation.",
   1613     .http_code = MHD_HTTP_BAD_REQUEST
   1614   },
   1615 
   1616   {
   1617     /* 1776 */
   1618     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_EXPIRATION_IS_NEVER,
   1619     .hint = "The purse expiration time is set to never, which is not allowed.",
   1620     .http_code = MHD_HTTP_BAD_REQUEST
   1621   },
   1622 
   1623   {
   1624     /* 1777 */
   1625     .ec = TALER_EC_EXCHANGE_RESERVES_PURSE_MERGE_SIGNATURE_INVALID,
   1626     .hint = "The signature affirming the merge of the purse is invalid.",
   1627     .http_code = MHD_HTTP_FORBIDDEN
   1628   },
   1629 
   1630   {
   1631     /* 1778 */
   1632     .ec = TALER_EC_EXCHANGE_RESERVES_RESERVE_MERGE_SIGNATURE_INVALID,
   1633     .hint = "The signature by the reserve affirming the merge is invalid.",
   1634     .http_code = MHD_HTTP_FORBIDDEN
   1635   },
   1636 
   1637   {
   1638     /* 1785 */
   1639     .ec = TALER_EC_EXCHANGE_RESERVES_OPEN_BAD_SIGNATURE,
   1640     .hint =
   1641       "The signature by the reserve affirming the open operation is invalid.",
   1642     .http_code = MHD_HTTP_FORBIDDEN
   1643   },
   1644 
   1645   {
   1646     /* 1786 */
   1647     .ec = TALER_EC_EXCHANGE_RESERVES_CLOSE_BAD_SIGNATURE,
   1648     .hint =
   1649       "The signature by the reserve affirming the close operation is invalid.",
   1650     .http_code = MHD_HTTP_FORBIDDEN
   1651   },
   1652 
   1653   {
   1654     /* 1787 */
   1655     .ec = TALER_EC_EXCHANGE_RESERVES_ATTEST_BAD_SIGNATURE,
   1656     .hint =
   1657       "The signature by the reserve affirming the attestion request is invalid.",
   1658     .http_code = MHD_HTTP_FORBIDDEN
   1659   },
   1660 
   1661   {
   1662     /* 1788 */
   1663     .ec = TALER_EC_EXCHANGE_RESERVES_CLOSE_NO_TARGET_ACCOUNT,
   1664     .hint =
   1665       "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.",
   1666     .http_code = MHD_HTTP_CONFLICT
   1667   },
   1668 
   1669   {
   1670     /* 1789 */
   1671     .ec = TALER_EC_EXCHANGE_RESERVES_OPEN_INSUFFICIENT_FUNDS,
   1672     .hint =
   1673       "The reserve balance is insufficient to pay for the open operation.",
   1674     .http_code = MHD_HTTP_CONFLICT
   1675   },
   1676 
   1677   {
   1678     /* 1790 */
   1679     .ec = TALER_EC_EXCHANGE_RESERVES_OPEN_COIN_SIGNATURE_INVALID,
   1680     .hint =
   1681       "A coin signature for a deposit to pay to open the reserve is invalid.",
   1682     .http_code = MHD_HTTP_FORBIDDEN
   1683   },
   1684 
   1685   {
   1686     /* 1800 */
   1687     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_NOT_FOUND,
   1688     .hint =
   1689       "The auditor that was supposed to be disabled is unknown to this exchange.",
   1690     .http_code = MHD_HTTP_NOT_FOUND
   1691   },
   1692 
   1693   {
   1694     /* 1801 */
   1695     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_MORE_RECENT_PRESENT,
   1696     .hint =
   1697       "The exchange has a more recently signed conflicting instruction and is thus refusing the current change (replay detected).",
   1698     .http_code = MHD_HTTP_CONFLICT
   1699   },
   1700 
   1701   {
   1702     /* 1802 */
   1703     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_ADD_SIGNATURE_INVALID,
   1704     .hint = "The signature to add or enable the auditor does not validate.",
   1705     .http_code = MHD_HTTP_FORBIDDEN
   1706   },
   1707 
   1708   {
   1709     /* 1803 */
   1710     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AUDITOR_DEL_SIGNATURE_INVALID,
   1711     .hint = "The signature to disable the auditor does not validate.",
   1712     .http_code = MHD_HTTP_FORBIDDEN
   1713   },
   1714 
   1715   {
   1716     /* 1804 */
   1717     .ec = TALER_EC_EXCHANGE_MANAGEMENT_DENOMINATION_REVOKE_SIGNATURE_INVALID,
   1718     .hint = "The signature to revoke the denomination does not validate.",
   1719     .http_code = MHD_HTTP_FORBIDDEN
   1720   },
   1721 
   1722   {
   1723     /* 1805 */
   1724     .ec = TALER_EC_EXCHANGE_MANAGEMENT_SIGNKEY_REVOKE_SIGNATURE_INVALID,
   1725     .hint = "The signature to revoke the online signing key does not validate.",
   1726     .http_code = MHD_HTTP_FORBIDDEN
   1727   },
   1728 
   1729   {
   1730     /* 1806 */
   1731     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_MORE_RECENT_PRESENT,
   1732     .hint =
   1733       "The exchange has a more recently signed conflicting instruction and is thus refusing the current change (replay detected).",
   1734     .http_code = MHD_HTTP_CONFLICT
   1735   },
   1736 
   1737   {
   1738     /* 1807 */
   1739     .ec = TALER_EC_EXCHANGE_MANAGEMENT_KEYS_SIGNKEY_UNKNOWN,
   1740     .hint = "The signingkey specified is unknown to the exchange.",
   1741     .http_code = MHD_HTTP_NOT_FOUND
   1742   },
   1743 
   1744   {
   1745     /* 1808 */
   1746     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_DETAILS_SIGNATURE_INVALID,
   1747     .hint = "The signature to publish wire account does not validate.",
   1748     .http_code = MHD_HTTP_FORBIDDEN
   1749   },
   1750 
   1751   {
   1752     /* 1809 */
   1753     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_ADD_SIGNATURE_INVALID,
   1754     .hint = "The signature to add the wire account does not validate.",
   1755     .http_code = MHD_HTTP_FORBIDDEN
   1756   },
   1757 
   1758   {
   1759     /* 1810 */
   1760     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_DEL_SIGNATURE_INVALID,
   1761     .hint = "The signature to disable the wire account does not validate.",
   1762     .http_code = MHD_HTTP_FORBIDDEN
   1763   },
   1764 
   1765   {
   1766     /* 1811 */
   1767     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_NOT_FOUND,
   1768     .hint = "The wire account to be disabled is unknown to the exchange.",
   1769     .http_code = MHD_HTTP_NOT_FOUND
   1770   },
   1771 
   1772   {
   1773     /* 1812 */
   1774     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_FEE_SIGNATURE_INVALID,
   1775     .hint = "The signature to affirm wire fees does not validate.",
   1776     .http_code = MHD_HTTP_FORBIDDEN
   1777   },
   1778 
   1779   {
   1780     /* 1813 */
   1781     .ec = TALER_EC_EXCHANGE_MANAGEMENT_WIRE_FEE_MISMATCH,
   1782     .hint =
   1783       "The signature conflicts with a previous signature affirming different fees.",
   1784     .http_code = MHD_HTTP_CONFLICT
   1785   },
   1786 
   1787   {
   1788     /* 1814 */
   1789     .ec = TALER_EC_EXCHANGE_MANAGEMENT_KEYS_DENOMKEY_ADD_SIGNATURE_INVALID,
   1790     .hint = "The signature affirming the denomination key is invalid.",
   1791     .http_code = MHD_HTTP_FORBIDDEN
   1792   },
   1793 
   1794   {
   1795     /* 1815 */
   1796     .ec = TALER_EC_EXCHANGE_MANAGEMENT_KEYS_SIGNKEY_ADD_SIGNATURE_INVALID,
   1797     .hint = "The signature affirming the signing key is invalid.",
   1798     .http_code = MHD_HTTP_FORBIDDEN
   1799   },
   1800 
   1801   {
   1802     /* 1816 */
   1803     .ec = TALER_EC_EXCHANGE_MANAGEMENT_GLOBAL_FEE_MISMATCH,
   1804     .hint =
   1805       "The signature conflicts with a previous signature affirming different fees.",
   1806     .http_code = MHD_HTTP_CONFLICT
   1807   },
   1808 
   1809   {
   1810     /* 1817 */
   1811     .ec = TALER_EC_EXCHANGE_MANAGEMENT_GLOBAL_FEE_SIGNATURE_INVALID,
   1812     .hint = "The signature affirming the fee structure is invalid.",
   1813     .http_code = MHD_HTTP_FORBIDDEN
   1814   },
   1815 
   1816   {
   1817     /* 1818 */
   1818     .ec = TALER_EC_EXCHANGE_MANAGEMENT_DRAIN_PROFITS_SIGNATURE_INVALID,
   1819     .hint = "The signature affirming the profit drain is invalid.",
   1820     .http_code = MHD_HTTP_FORBIDDEN
   1821   },
   1822 
   1823   {
   1824     /* 1825 */
   1825     .ec = TALER_EC_EXCHANGE_AML_DECISION_ADD_SIGNATURE_INVALID,
   1826     .hint = "The signature affirming the AML decision is invalid.",
   1827     .http_code = MHD_HTTP_FORBIDDEN
   1828   },
   1829 
   1830   {
   1831     /* 1826 */
   1832     .ec = TALER_EC_EXCHANGE_AML_DECISION_INVALID_OFFICER,
   1833     .hint =
   1834       "The AML officer specified is not allowed to make AML decisions right now.",
   1835     .http_code = MHD_HTTP_FORBIDDEN
   1836   },
   1837 
   1838   {
   1839     /* 1827 */
   1840     .ec = TALER_EC_EXCHANGE_AML_DECISION_MORE_RECENT_PRESENT,
   1841     .hint =
   1842       "There is a more recent AML decision on file. The decision was rejected as timestamps of AML decisions must be monotonically increasing.",
   1843     .http_code = MHD_HTTP_CONFLICT
   1844   },
   1845 
   1846   {
   1847     /* 1828 */
   1848     .ec = TALER_EC_EXCHANGE_AML_DECISION_UNKNOWN_CHECK,
   1849     .hint =
   1850       "There AML decision would impose an AML check of a type that is not provided by any KYC provider known to the exchange.",
   1851     .http_code = MHD_HTTP_BAD_REQUEST
   1852   },
   1853 
   1854   {
   1855     /* 1830 */
   1856     .ec = TALER_EC_EXCHANGE_MANAGEMENT_UPDATE_AML_OFFICER_SIGNATURE_INVALID,
   1857     .hint =
   1858       "The signature affirming the change in the AML officer status is invalid.",
   1859     .http_code = MHD_HTTP_FORBIDDEN
   1860   },
   1861 
   1862   {
   1863     /* 1831 */
   1864     .ec = TALER_EC_EXCHANGE_MANAGEMENT_AML_OFFICERS_MORE_RECENT_PRESENT,
   1865     .hint =
   1866       "A more recent decision about the AML officer status is known to the exchange.",
   1867     .http_code = MHD_HTTP_CONFLICT
   1868   },
   1869 
   1870   {
   1871     /* 1832 */
   1872     .ec = TALER_EC_EXCHANGE_MANAGEMENT_CONFLICTING_DENOMINATION_META_DATA,
   1873     .hint =
   1874       "The exchange already has this denomination key configured, but with different meta data. This should not be possible, contact the developers for support.",
   1875     .http_code = MHD_HTTP_CONFLICT
   1876   },
   1877 
   1878   {
   1879     /* 1833 */
   1880     .ec = TALER_EC_EXCHANGE_MANAGEMENT_CONFLICTING_SIGNKEY_META_DATA,
   1881     .hint =
   1882       "The exchange already has this signing key configured, but with different meta data. This should not be possible, contact the developers for support.",
   1883     .http_code = MHD_HTTP_CONFLICT
   1884   },
   1885 
   1886   {
   1887     /* 1850 */
   1888     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_CONFLICTING_META_DATA,
   1889     .hint = "The purse was previously created with different meta data.",
   1890     .http_code = MHD_HTTP_CONFLICT
   1891   },
   1892 
   1893   {
   1894     /* 1851 */
   1895     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_CONFLICTING_CONTRACT_STORED,
   1896     .hint = "The purse was previously created with a different contract.",
   1897     .http_code = MHD_HTTP_CONFLICT
   1898   },
   1899 
   1900   {
   1901     /* 1852 */
   1902     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_COIN_SIGNATURE_INVALID,
   1903     .hint = "A coin signature for a deposit into the purse is invalid.",
   1904     .http_code = MHD_HTTP_FORBIDDEN
   1905   },
   1906 
   1907   {
   1908     /* 1853 */
   1909     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXPIRATION_BEFORE_NOW,
   1910     .hint = "The purse expiration time is in the past.",
   1911     .http_code = MHD_HTTP_BAD_REQUEST
   1912   },
   1913 
   1914   {
   1915     /* 1854 */
   1916     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXPIRATION_IS_NEVER,
   1917     .hint = "The purse expiration time is \"never\".",
   1918     .http_code = MHD_HTTP_BAD_REQUEST
   1919   },
   1920 
   1921   {
   1922     /* 1855 */
   1923     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_SIGNATURE_INVALID,
   1924     .hint = "The purse signature over the purse meta data is invalid.",
   1925     .http_code = MHD_HTTP_FORBIDDEN
   1926   },
   1927 
   1928   {
   1929     /* 1856 */
   1930     .ec = TALER_EC_EXCHANGE_PURSE_ECONTRACT_SIGNATURE_INVALID,
   1931     .hint = "The signature over the encrypted contract is invalid.",
   1932     .http_code = MHD_HTTP_FORBIDDEN
   1933   },
   1934 
   1935   {
   1936     /* 1857 */
   1937     .ec = TALER_EC_EXCHANGE_PURSE_CREATE_EXCHANGE_SIGNATURE_INVALID,
   1938     .hint = "The signature from the exchange over the confirmation is invalid.",
   1939     .http_code = MHD_HTTP_UNINITIALIZED
   1940   },
   1941 
   1942   {
   1943     /* 1858 */
   1944     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_CONFLICTING_META_DATA,
   1945     .hint = "The coin was previously deposited with different meta data.",
   1946     .http_code = MHD_HTTP_CONFLICT
   1947   },
   1948 
   1949   {
   1950     /* 1859 */
   1951     .ec = TALER_EC_EXCHANGE_PURSE_ECONTRACT_CONFLICTING_META_DATA,
   1952     .hint =
   1953       "The encrypted contract was previously uploaded with different meta data.",
   1954     .http_code = MHD_HTTP_CONFLICT
   1955   },
   1956 
   1957   {
   1958     /* 1860 */
   1959     .ec = TALER_EC_EXCHANGE_CREATE_PURSE_NEGATIVE_VALUE_AFTER_FEE,
   1960     .hint = "The deposited amount is less than the purse fee.",
   1961     .http_code = MHD_HTTP_BAD_REQUEST
   1962   },
   1963 
   1964   {
   1965     /* 1876 */
   1966     .ec = TALER_EC_EXCHANGE_PURSE_MERGE_INVALID_MERGE_SIGNATURE,
   1967     .hint = "The signature using the merge key is invalid.",
   1968     .http_code = MHD_HTTP_FORBIDDEN
   1969   },
   1970 
   1971   {
   1972     /* 1877 */
   1973     .ec = TALER_EC_EXCHANGE_PURSE_MERGE_INVALID_RESERVE_SIGNATURE,
   1974     .hint = "The signature using the reserve key is invalid.",
   1975     .http_code = MHD_HTTP_FORBIDDEN
   1976   },
   1977 
   1978   {
   1979     /* 1878 */
   1980     .ec = TALER_EC_EXCHANGE_PURSE_NOT_FULL,
   1981     .hint =
   1982       "The targeted purse is not yet full and thus cannot be merged. Retrying the request later may succeed.",
   1983     .http_code = MHD_HTTP_CONFLICT
   1984   },
   1985 
   1986   {
   1987     /* 1879 */
   1988     .ec = TALER_EC_EXCHANGE_PURSE_MERGE_EXCHANGE_SIGNATURE_INVALID,
   1989     .hint = "The signature from the exchange over the confirmation is invalid.",
   1990     .http_code = MHD_HTTP_UNINITIALIZED
   1991   },
   1992 
   1993   {
   1994     /* 1880 */
   1995     .ec = TALER_EC_EXCHANGE_MERGE_PURSE_PARTNER_UNKNOWN,
   1996     .hint =
   1997       "The exchange of the target account is not a partner of this exchange.",
   1998     .http_code = MHD_HTTP_NOT_FOUND
   1999   },
   2000 
   2001   {
   2002     /* 1890 */
   2003     .ec = TALER_EC_EXCHANGE_MANAGEMENT_ADD_PARTNER_SIGNATURE_INVALID,
   2004     .hint = "The signature affirming the new partner is invalid.",
   2005     .http_code = MHD_HTTP_FORBIDDEN
   2006   },
   2007 
   2008   {
   2009     /* 1891 */
   2010     .ec = TALER_EC_EXCHANGE_MANAGEMENT_ADD_PARTNER_DATA_CONFLICT,
   2011     .hint =
   2012       "Conflicting data for the partner already exists with the exchange.",
   2013     .http_code = MHD_HTTP_CONFLICT
   2014   },
   2015 
   2016   {
   2017     /* 1900 */
   2018     .ec = TALER_EC_EXCHANGE_AUDITORS_AUDITOR_SIGNATURE_INVALID,
   2019     .hint = "The auditor signature over the denomination meta data is invalid.",
   2020     .http_code = MHD_HTTP_FORBIDDEN
   2021   },
   2022 
   2023   {
   2024     /* 1901 */
   2025     .ec = TALER_EC_EXCHANGE_AUDITORS_AUDITOR_UNKNOWN,
   2026     .hint = "The auditor that was specified is unknown to this exchange.",
   2027     .http_code = MHD_HTTP_PRECONDITION_FAILED
   2028   },
   2029 
   2030   {
   2031     /* 1902 */
   2032     .ec = TALER_EC_EXCHANGE_AUDITORS_AUDITOR_INACTIVE,
   2033     .hint =
   2034       "The auditor that was specified is no longer used by this exchange.",
   2035     .http_code = MHD_HTTP_GONE
   2036   },
   2037 
   2038   {
   2039     /* 1917 */
   2040     .ec = TALER_EC_EXCHANGE_KYC_INVALID_FORM_SUBMITTED,
   2041     .hint =
   2042       "The client submitted the wrong form for the request. This is some invalid use of the API. Please contact technical support.",
   2043     .http_code = MHD_HTTP_CONFLICT
   2044   },
   2045 
   2046   {
   2047     /* 1918 */
   2048     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_AML_PROGRAM_TIMEOUT,
   2049     .hint =
   2050       "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).",
   2051     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2052   },
   2053 
   2054   {
   2055     /* 1919 */
   2056     .ec = TALER_EC_EXCHANGE_KYC_INFO_AUTHORIZATION_FAILED,
   2057     .hint =
   2058       "The KYC info access token is not recognized. Hence the request was denied.",
   2059     .http_code = MHD_HTTP_FORBIDDEN
   2060   },
   2061 
   2062   {
   2063     /* 1920 */
   2064     .ec = TALER_EC_EXCHANGE_KYC_RECURSIVE_RULE_DETECTED,
   2065     .hint =
   2066       "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.",
   2067     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2068   },
   2069 
   2070   {
   2071     /* 1921 */
   2072     .ec = TALER_EC_EXCHANGE_KYC_AML_FORM_INCOMPLETE,
   2073     .hint =
   2074       "The submitted KYC data lacks an attribute that is required by the KYC form. Please submit the complete form.",
   2075     .http_code = MHD_HTTP_BAD_REQUEST
   2076   },
   2077 
   2078   {
   2079     /* 1922 */
   2080     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_AML_PROGRAM_GONE,
   2081     .hint =
   2082       "The request requires an AML program which is no longer configured at the exchange. Contact the exchange operator to address the configuration issue.",
   2083     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2084   },
   2085 
   2086   {
   2087     /* 1923 */
   2088     .ec = TALER_EC_EXCHANGE_KYC_NOT_A_FORM,
   2089     .hint =
   2090       "The given check is not of type 'form' and thus using this handler for form submission is incorrect.",
   2091     .http_code = MHD_HTTP_BAD_REQUEST
   2092   },
   2093 
   2094   {
   2095     /* 1924 */
   2096     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_CHECK_GONE,
   2097     .hint =
   2098       "The request requires a check which is no longer configured at the exchange. Contact the exchange operator to address the configuration issue.",
   2099     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2100   },
   2101 
   2102   {
   2103     /* 1925 */
   2104     .ec = TALER_EC_EXCHANGE_KYC_WALLET_SIGNATURE_INVALID,
   2105     .hint = "The signature affirming the wallet's KYC request was invalid.",
   2106     .http_code = MHD_HTTP_FORBIDDEN
   2107   },
   2108 
   2109   {
   2110     /* 1926 */
   2111     .ec = TALER_EC_EXCHANGE_KYC_PROOF_BACKEND_INVALID_RESPONSE,
   2112     .hint =
   2113       "The exchange received an unexpected malformed response from its KYC backend.",
   2114     .http_code = MHD_HTTP_BAD_GATEWAY
   2115   },
   2116 
   2117   {
   2118     /* 1927 */
   2119     .ec = TALER_EC_EXCHANGE_KYC_PROOF_BACKEND_ERROR,
   2120     .hint = "The backend signaled an unexpected failure.",
   2121     .http_code = MHD_HTTP_BAD_GATEWAY
   2122   },
   2123 
   2124   {
   2125     /* 1928 */
   2126     .ec = TALER_EC_EXCHANGE_KYC_PROOF_BACKEND_AUTHORIZATION_FAILED,
   2127     .hint = "The backend signaled an authorization failure.",
   2128     .http_code = MHD_HTTP_FORBIDDEN
   2129   },
   2130 
   2131   {
   2132     /* 1929 */
   2133     .ec = TALER_EC_EXCHANGE_KYC_PROOF_REQUEST_UNKNOWN,
   2134     .hint =
   2135       "The exchange is unaware of having made an the authorization request.",
   2136     .http_code = MHD_HTTP_NOT_FOUND
   2137   },
   2138 
   2139   {
   2140     /* 1930 */
   2141     .ec = TALER_EC_EXCHANGE_KYC_CHECK_AUTHORIZATION_FAILED,
   2142     .hint =
   2143       "The KYC authorization signature was invalid. Hence the request was denied.",
   2144     .http_code = MHD_HTTP_FORBIDDEN
   2145   },
   2146 
   2147   {
   2148     /* 1931 */
   2149     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_UNKNOWN,
   2150     .hint =
   2151       "The request used a logic specifier that is not known to the exchange.",
   2152     .http_code = MHD_HTTP_NOT_FOUND
   2153   },
   2154 
   2155   {
   2156     /* 1932 */
   2157     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_GONE,
   2158     .hint =
   2159       "The request requires a logic which is no longer configured at the exchange.",
   2160     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2161   },
   2162 
   2163   {
   2164     /* 1933 */
   2165     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_LOGIC_BUG,
   2166     .hint =
   2167       "The logic plugin had a bug in its interaction with the KYC provider.",
   2168     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2169   },
   2170 
   2171   {
   2172     /* 1934 */
   2173     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_ACCESS_REFUSED,
   2174     .hint =
   2175       "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.",
   2176     .http_code = MHD_HTTP_NETWORK_AUTHENTICATION_REQUIRED
   2177   },
   2178 
   2179   {
   2180     /* 1935 */
   2181     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_TIMEOUT,
   2182     .hint =
   2183       "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.",
   2184     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
   2185   },
   2186 
   2187   {
   2188     /* 1936 */
   2189     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_UNEXPECTED_REPLY,
   2190     .hint =
   2191       "The KYC provider responded with a status that was completely unexpected by the KYC logic of the exchange.",
   2192     .http_code = MHD_HTTP_BAD_GATEWAY
   2193   },
   2194 
   2195   {
   2196     /* 1937 */
   2197     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_RATE_LIMIT_EXCEEDED,
   2198     .hint =
   2199       "The rate limit of the exchange at the KYC provider has been exceeded. Trying much later might work.",
   2200     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
   2201   },
   2202 
   2203   {
   2204     /* 1938 */
   2205     .ec = TALER_EC_EXCHANGE_KYC_WEBHOOK_UNAUTHORIZED,
   2206     .hint =
   2207       "The request to the webhook lacked proper authorization or authentication data.",
   2208     .http_code = MHD_HTTP_UNAUTHORIZED
   2209   },
   2210 
   2211   {
   2212     /* 1939 */
   2213     .ec = TALER_EC_EXCHANGE_KYC_CHECK_REQUEST_UNKNOWN,
   2214     .hint =
   2215       "The exchange is unaware of the requested payto URI with respect to the KYC status.",
   2216     .http_code = MHD_HTTP_NOT_FOUND
   2217   },
   2218 
   2219   {
   2220     /* 1940 */
   2221     .ec = TALER_EC_EXCHANGE_KYC_CHECK_AUTHORIZATION_KEY_UNKNOWN,
   2222     .hint =
   2223       "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.",
   2224     .http_code = MHD_HTTP_CONFLICT
   2225   },
   2226 
   2227   {
   2228     /* 1941 */
   2229     .ec = TALER_EC_EXCHANGE_KYC_FORM_ALREADY_UPLOADED,
   2230     .hint =
   2231       "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.",
   2232     .http_code = MHD_HTTP_CONFLICT
   2233   },
   2234 
   2235   {
   2236     /* 1942 */
   2237     .ec = TALER_EC_EXCHANGE_KYC_MEASURES_MALFORMED,
   2238     .hint =
   2239       "The internal state of the exchange specifying KYC measures is malformed. Please contact technical support.",
   2240     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2241   },
   2242 
   2243   {
   2244     /* 1943 */
   2245     .ec = TALER_EC_EXCHANGE_KYC_MEASURE_INDEX_INVALID,
   2246     .hint =
   2247       "The specified index does not refer to a valid KYC measure. Please check the URL.",
   2248     .http_code = MHD_HTTP_NOT_FOUND
   2249   },
   2250 
   2251   {
   2252     /* 1944 */
   2253     .ec = TALER_EC_EXCHANGE_KYC_INVALID_LOGIC_TO_CHECK,
   2254     .hint =
   2255       "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.",
   2256     .http_code = MHD_HTTP_CONFLICT
   2257   },
   2258 
   2259   {
   2260     /* 1945 */
   2261     .ec = TALER_EC_EXCHANGE_KYC_AML_PROGRAM_FAILURE,
   2262     .hint =
   2263       "The AML program failed. This is either caused by a configuration change or a bug. Please contact technical support.",
   2264     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2265   },
   2266 
   2267   {
   2268     /* 1946 */
   2269     .ec = TALER_EC_EXCHANGE_KYC_AML_PROGRAM_MALFORMED_RESULT,
   2270     .hint =
   2271       "The AML program returned a malformed result. This is a bug. Please contact technical support.",
   2272     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2273   },
   2274 
   2275   {
   2276     /* 1947 */
   2277     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_INCOMPLETE_REPLY,
   2278     .hint =
   2279       "The response from the KYC provider lacked required attributes. Please contact technical support.",
   2280     .http_code = MHD_HTTP_BAD_GATEWAY
   2281   },
   2282 
   2283   {
   2284     /* 1948 */
   2285     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_PROVIDER_INCOMPLETE_CONTEXT,
   2286     .hint =
   2287       "The context of the KYC check lacked required fields. This is a bug. Please contact technical support.",
   2288     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2289   },
   2290 
   2291   {
   2292     /* 1949 */
   2293     .ec = TALER_EC_EXCHANGE_KYC_GENERIC_AML_LOGIC_BUG,
   2294     .hint =
   2295       "The logic plugin had a bug in its AML processing. This is a bug. Please contact technical support.",
   2296     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2297   },
   2298 
   2299   {
   2300     /* 1950 */
   2301     .ec = TALER_EC_EXCHANGE_CONTRACTS_UNKNOWN,
   2302     .hint =
   2303       "The exchange does not know a contract under the given contract public key.",
   2304     .http_code = MHD_HTTP_NOT_FOUND
   2305   },
   2306 
   2307   {
   2308     /* 1951 */
   2309     .ec = TALER_EC_EXCHANGE_CONTRACTS_INVALID_CONTRACT_PUB,
   2310     .hint = "The URL does not encode a valid exchange public key in its path.",
   2311     .http_code = MHD_HTTP_BAD_REQUEST
   2312   },
   2313 
   2314   {
   2315     /* 1952 */
   2316     .ec = TALER_EC_EXCHANGE_CONTRACTS_DECRYPTION_FAILED,
   2317     .hint = "The returned encrypted contract did not decrypt.",
   2318     .http_code = MHD_HTTP_UNINITIALIZED
   2319   },
   2320 
   2321   {
   2322     /* 1953 */
   2323     .ec = TALER_EC_EXCHANGE_CONTRACTS_SIGNATURE_INVALID,
   2324     .hint = "The signature on the encrypted contract did not validate.",
   2325     .http_code = MHD_HTTP_UNINITIALIZED
   2326   },
   2327 
   2328   {
   2329     /* 1954 */
   2330     .ec = TALER_EC_EXCHANGE_CONTRACTS_DECODING_FAILED,
   2331     .hint = "The decrypted contract was malformed.",
   2332     .http_code = MHD_HTTP_UNINITIALIZED
   2333   },
   2334 
   2335   {
   2336     /* 1975 */
   2337     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_COIN_SIGNATURE_INVALID,
   2338     .hint = "A coin signature for a deposit into the purse is invalid.",
   2339     .http_code = MHD_HTTP_FORBIDDEN
   2340   },
   2341 
   2342   {
   2343     /* 1976 */
   2344     .ec = TALER_EC_EXCHANGE_PURSE_DEPOSIT_DECIDED_ALREADY,
   2345     .hint = "It is too late to deposit coins into the purse.",
   2346     .http_code = MHD_HTTP_GONE
   2347   },
   2348 
   2349   {
   2350     /* 1977 */
   2351     .ec = TALER_EC_EXCHANGE_KYC_INFO_BUSY,
   2352     .hint =
   2353       "The exchange is currently processing the KYC status and is not able to return a response yet.",
   2354     .http_code = MHD_HTTP_ACCEPTED
   2355   },
   2356 
   2357   {
   2358     /* 1980 */
   2359     .ec = TALER_EC_EXCHANGE_TOTP_KEY_INVALID,
   2360     .hint = "TOTP key is not valid.",
   2361     .http_code = MHD_HTTP_UNINITIALIZED
   2362   },
   2363 
   2364   {
   2365     /* 2000 */
   2366     .ec = TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN,
   2367     .hint =
   2368       "The backend could not find the merchant instance specified in the request.",
   2369     .http_code = MHD_HTTP_NOT_FOUND
   2370   },
   2371 
   2372   {
   2373     /* 2001 */
   2374     .ec = TALER_EC_MERCHANT_GENERIC_HOLE_IN_WIRE_FEE_STRUCTURE,
   2375     .hint =
   2376       "The start and end-times in the wire fee structure leave a hole. This is not allowed.",
   2377     .http_code = MHD_HTTP_UNINITIALIZED
   2378   },
   2379 
   2380   {
   2381     /* 2002 */
   2382     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_MASTER_KEY_MISMATCH,
   2383     .hint =
   2384       "The master key of the exchange does not match the one configured for this merchant. As a result, we refuse to do business with this exchange. The administrator should check if they configured the exchange correctly in the merchant backend.",
   2385     .http_code = MHD_HTTP_BAD_GATEWAY
   2386   },
   2387 
   2388   {
   2389     /* 2003 */
   2390     .ec = TALER_EC_MERCHANT_GENERIC_CATEGORY_UNKNOWN,
   2391     .hint = "The product category is not known to the backend.",
   2392     .http_code = MHD_HTTP_NOT_FOUND
   2393   },
   2394 
   2395   {
   2396     /* 2004 */
   2397     .ec = TALER_EC_MERCHANT_GENERIC_UNIT_UNKNOWN,
   2398     .hint = "The unit referenced in the request is not known to the backend.",
   2399     .http_code = MHD_HTTP_NOT_FOUND
   2400   },
   2401 
   2402   {
   2403     /* 2005 */
   2404     .ec = TALER_EC_MERCHANT_GENERIC_ORDER_UNKNOWN,
   2405     .hint = "The proposal is not known to the backend.",
   2406     .http_code = MHD_HTTP_NOT_FOUND
   2407   },
   2408 
   2409   {
   2410     /* 2006 */
   2411     .ec = TALER_EC_MERCHANT_GENERIC_PRODUCT_UNKNOWN,
   2412     .hint =
   2413       "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.",
   2414     .http_code = MHD_HTTP_NOT_FOUND
   2415   },
   2416 
   2417   {
   2418     /* 2007 */
   2419     .ec = TALER_EC_MERCHANT_GENERIC_REWARD_ID_UNKNOWN,
   2420     .hint =
   2421       "The reward ID is unknown.  This could happen if the reward has expired.",
   2422     .http_code = MHD_HTTP_NOT_FOUND
   2423   },
   2424 
   2425   {
   2426     /* 2008 */
   2427     .ec = TALER_EC_MERCHANT_GENERIC_DB_CONTRACT_CONTENT_INVALID,
   2428     .hint = "The contract obtained from the merchant backend was malformed.",
   2429     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2430   },
   2431 
   2432   {
   2433     /* 2009 */
   2434     .ec = TALER_EC_MERCHANT_GENERIC_CONTRACT_HASH_DOES_NOT_MATCH_ORDER,
   2435     .hint = "The order we found does not match the provided contract hash.",
   2436     .http_code = MHD_HTTP_FORBIDDEN
   2437   },
   2438 
   2439   {
   2440     /* 2010 */
   2441     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_KEYS_FAILURE,
   2442     .hint =
   2443       "The exchange failed to provide a valid response to the merchant's /keys request.",
   2444     .http_code = MHD_HTTP_BAD_GATEWAY
   2445   },
   2446 
   2447   {
   2448     /* 2011 */
   2449     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_TIMEOUT,
   2450     .hint = "The exchange failed to respond to the merchant on time.",
   2451     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
   2452   },
   2453 
   2454   {
   2455     /* 2012 */
   2456     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_CONNECT_FAILURE,
   2457     .hint = "The merchant failed to talk to the exchange.",
   2458     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2459   },
   2460 
   2461   {
   2462     /* 2013 */
   2463     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_REPLY_MALFORMED,
   2464     .hint = "The exchange returned a maformed response.",
   2465     .http_code = MHD_HTTP_BAD_GATEWAY
   2466   },
   2467 
   2468   {
   2469     /* 2014 */
   2470     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_UNEXPECTED_STATUS,
   2471     .hint = "The exchange returned an unexpected response status.",
   2472     .http_code = MHD_HTTP_BAD_GATEWAY
   2473   },
   2474 
   2475   {
   2476     /* 2015 */
   2477     .ec = TALER_EC_MERCHANT_GENERIC_UNAUTHORIZED,
   2478     .hint = "The merchant refused the request due to lack of authorization.",
   2479     .http_code = MHD_HTTP_UNAUTHORIZED
   2480   },
   2481 
   2482   {
   2483     /* 2016 */
   2484     .ec = TALER_EC_MERCHANT_GENERIC_INSTANCE_DELETED,
   2485     .hint = "The merchant instance specified in the request was deleted.",
   2486     .http_code = MHD_HTTP_NOT_FOUND
   2487   },
   2488 
   2489   {
   2490     /* 2017 */
   2491     .ec = TALER_EC_MERCHANT_GENERIC_TRANSFER_UNKNOWN,
   2492     .hint =
   2493       "The backend could not find the inbound wire transfer specified in the request.",
   2494     .http_code = MHD_HTTP_NOT_FOUND
   2495   },
   2496 
   2497   {
   2498     /* 2018 */
   2499     .ec = TALER_EC_MERCHANT_GENERIC_TEMPLATE_UNKNOWN,
   2500     .hint =
   2501       "The backend could not find the template(id) because it is not exist.",
   2502     .http_code = MHD_HTTP_NOT_FOUND
   2503   },
   2504 
   2505   {
   2506     /* 2019 */
   2507     .ec = TALER_EC_MERCHANT_GENERIC_WEBHOOK_UNKNOWN,
   2508     .hint =
   2509       "The backend could not find the webhook(id) because it is not exist.",
   2510     .http_code = MHD_HTTP_NOT_FOUND
   2511   },
   2512 
   2513   {
   2514     /* 2020 */
   2515     .ec = TALER_EC_MERCHANT_GENERIC_PENDING_WEBHOOK_UNKNOWN,
   2516     .hint =
   2517       "The backend could not find the webhook(serial) because it is not exist.",
   2518     .http_code = MHD_HTTP_NOT_FOUND
   2519   },
   2520 
   2521   {
   2522     /* 2021 */
   2523     .ec = TALER_EC_MERCHANT_GENERIC_OTP_DEVICE_UNKNOWN,
   2524     .hint =
   2525       "The backend could not find the OTP device(id) because it is not exist.",
   2526     .http_code = MHD_HTTP_NOT_FOUND
   2527   },
   2528 
   2529   {
   2530     /* 2022 */
   2531     .ec = TALER_EC_MERCHANT_GENERIC_ACCOUNT_UNKNOWN,
   2532     .hint = "The account is not known to the backend.",
   2533     .http_code = MHD_HTTP_NOT_FOUND
   2534   },
   2535 
   2536   {
   2537     /* 2023 */
   2538     .ec = TALER_EC_MERCHANT_GENERIC_H_WIRE_MALFORMED,
   2539     .hint = "The wire hash was malformed.",
   2540     .http_code = MHD_HTTP_BAD_REQUEST
   2541   },
   2542 
   2543   {
   2544     /* 2024 */
   2545     .ec = TALER_EC_MERCHANT_GENERIC_CURRENCY_MISMATCH,
   2546     .hint =
   2547       "The currency specified in the operation does not work with the current state of the given resource.",
   2548     .http_code = MHD_HTTP_CONFLICT
   2549   },
   2550 
   2551   {
   2552     /* 2025 */
   2553     .ec = TALER_EC_MERCHANT_GENERIC_EXCHANGE_UNTRUSTED,
   2554     .hint =
   2555       "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.",
   2556     .http_code = MHD_HTTP_BAD_REQUEST
   2557   },
   2558 
   2559   {
   2560     /* 2026 */
   2561     .ec = TALER_EC_MERCHANT_GENERIC_TOKEN_FAMILY_UNKNOWN,
   2562     .hint = "The token family is not known to the backend.",
   2563     .http_code = MHD_HTTP_NOT_FOUND
   2564   },
   2565 
   2566   {
   2567     /* 2027 */
   2568     .ec = TALER_EC_MERCHANT_GENERIC_TOKEN_KEY_UNKNOWN,
   2569     .hint =
   2570       "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.",
   2571     .http_code = MHD_HTTP_NOT_FOUND
   2572   },
   2573 
   2574   {
   2575     /* 2028 */
   2576     .ec = TALER_EC_MERCHANT_GENERIC_DONAU_NOT_CONFIGURED,
   2577     .hint =
   2578       "The merchant backend is not configured to support the DONAU protocol.",
   2579     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   2580   },
   2581 
   2582   {
   2583     /* 2029 */
   2584     .ec = TALER_EC_MERCHANT_EXCHANGE_SIGN_PUB_UNKNOWN,
   2585     .hint =
   2586       "The public signing key given in the exchange response is not in the current keys response.  It is possible that the operation will succeed later after the merchant has downloaded an updated keys response.",
   2587     .http_code = MHD_HTTP_UNINITIALIZED
   2588   },
   2589 
   2590   {
   2591     /* 2030 */
   2592     .ec = TALER_EC_MERCHANT_GENERIC_FEATURE_NOT_AVAILABLE,
   2593     .hint = "The merchant backend does not support the requested feature.",
   2594     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   2595   },
   2596 
   2597   {
   2598     /* 2031 */
   2599     .ec = TALER_EC_MERCHANT_GENERIC_MFA_MISSING,
   2600     .hint =
   2601       "This operation requires multi-factor authorization and the respective instance does not have a sufficient number of factors that could be validated configured. You need to ask the system administrator to perform this operation.",
   2602     .http_code = MHD_HTTP_FORBIDDEN
   2603   },
   2604 
   2605   {
   2606     /* 2032 */
   2607     .ec = TALER_EC_MERCHANT_GENERIC_DONAU_INVALID_RESPONSE,
   2608     .hint =
   2609       "A donation authority (Donau) provided an invalid response. This should be analyzed by the administrator. Trying again later may help.",
   2610     .http_code = MHD_HTTP_BAD_GATEWAY
   2611   },
   2612 
   2613   {
   2614     /* 2033 */
   2615     .ec = TALER_EC_MERCHANT_GENERIC_UNIT_BUILTIN,
   2616     .hint =
   2617       "The unit referenced in the request is builtin and cannot be modified or deleted.",
   2618     .http_code = MHD_HTTP_CONFLICT
   2619   },
   2620 
   2621   {
   2622     /* 2034 */
   2623     .ec = TALER_EC_MERCHANT_GENERIC_REPORT_UNKNOWN,
   2624     .hint =
   2625       "The report ID provided to the backend is not known to the backend.",
   2626     .http_code = MHD_HTTP_NOT_FOUND
   2627   },
   2628 
   2629   {
   2630     /* 2035 */
   2631     .ec = TALER_EC_MERCHANT_GENERIC_REPORT_GENERATOR_UNCONFIGURED,
   2632     .hint =
   2633       "The report ID provided to the backend is not known to the backend.",
   2634     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   2635   },
   2636 
   2637   {
   2638     /* 2036 */
   2639     .ec = TALER_EC_MERCHANT_GENERIC_PRODUCT_GROUP_UNKNOWN,
   2640     .hint =
   2641       "The product group ID provided to the backend is not known to the backend.",
   2642     .http_code = MHD_HTTP_NOT_FOUND
   2643   },
   2644 
   2645   {
   2646     /* 2037 */
   2647     .ec = TALER_EC_MERCHANT_GENERIC_MONEY_POT_UNKNOWN,
   2648     .hint =
   2649       "The money pod ID provided to the backend is not known to the backend.",
   2650     .http_code = MHD_HTTP_NOT_FOUND
   2651   },
   2652 
   2653   {
   2654     /* 2038 */
   2655     .ec = TALER_EC_MERCHANT_GENERIC_SESSION_UNKNOWN,
   2656     .hint =
   2657       "The session ID provided to the backend is not known to the backend.",
   2658     .http_code = MHD_HTTP_NOT_FOUND
   2659   },
   2660 
   2661   {
   2662     /* 2039 */
   2663     .ec = TALER_EC_MERCHANT_GENERIC_DONAU_CHARITY_UNKNOWN,
   2664     .hint =
   2665       "The merchant does not have a charity associated with the selected Donau. As a result, it cannot generate the requested donation receipt. This could happen if the charity was removed from the backend between order creation and payment.",
   2666     .http_code = MHD_HTTP_NOT_FOUND
   2667   },
   2668 
   2669   {
   2670     /* 2040 */
   2671     .ec = TALER_EC_MERCHANT_GENERIC_EXPECTED_TRANSFER_UNKNOWN,
   2672     .hint =
   2673       "The merchant does not expect any transfer with the given ID and can thus not return any details about it.",
   2674     .http_code = MHD_HTTP_NOT_FOUND
   2675   },
   2676 
   2677   {
   2678     /* 2041 */
   2679     .ec = TALER_EC_MERCHANT_GENERIC_DONAU_UNKNOWN,
   2680     .hint = "The Donau is not known to the backend.",
   2681     .http_code = MHD_HTTP_NOT_FOUND
   2682   },
   2683 
   2684   {
   2685     /* 2042 */
   2686     .ec = TALER_EC_MERCHANT_GENERIC_ACCESS_TOKEN_UNKNOWN,
   2687     .hint = "The access token is not known to the backend.",
   2688     .http_code = MHD_HTTP_NOT_FOUND
   2689   },
   2690 
   2691   {
   2692     /* 2048 */
   2693     .ec = TALER_EC_MERCHANT_GENERIC_NO_TYPST_OR_PDFTK,
   2694     .hint =
   2695       "One of the binaries needed to generate the PDF is not installed. If this feature is required, the system administrator should make sure Typst and pdftk are both installed.",
   2696     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   2697   },
   2698 
   2699   {
   2700     /* 2100 */
   2701     .ec = TALER_EC_MERCHANT_GET_ORDERS_EXCHANGE_TRACKING_FAILURE,
   2702     .hint =
   2703       "The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response.",
   2704     .http_code = MHD_HTTP_OK
   2705   },
   2706 
   2707   {
   2708     /* 2103 */
   2709     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_EXCHANGE_REQUEST_FAILURE,
   2710     .hint =
   2711       "The merchant backend failed to construct the request for tracking to the exchange, thus tracking details are not in the response.",
   2712     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2713   },
   2714 
   2715   {
   2716     /* 2104 */
   2717     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_EXCHANGE_LOOKUP_START_FAILURE,
   2718     .hint =
   2719       "The merchant backend failed trying to contact the exchange for tracking details, thus those details are not in the response.",
   2720     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2721   },
   2722 
   2723   {
   2724     /* 2105 */
   2725     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_INVALID_TOKEN,
   2726     .hint =
   2727       "The claim token used to authenticate the client is invalid for this order.",
   2728     .http_code = MHD_HTTP_FORBIDDEN
   2729   },
   2730 
   2731   {
   2732     /* 2106 */
   2733     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_INVALID_CONTRACT_HASH,
   2734     .hint =
   2735       "The contract terms hash used to authenticate the client is invalid for this order.",
   2736     .http_code = MHD_HTTP_FORBIDDEN
   2737   },
   2738 
   2739   {
   2740     /* 2107 */
   2741     .ec = TALER_EC_MERCHANT_GET_ORDERS_ID_INVALID_CONTRACT_VERSION,
   2742     .hint =
   2743       "The contract terms version is not understood by the merchant backend. Most likely the merchant backend was downgraded to a version incompatible with the content of the database.",
   2744     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2745   },
   2746 
   2747   {
   2748     /* 2125 */
   2749     .ec = TALER_EC_MERCHANT_TAN_CHALLENGE_FAILED,
   2750     .hint = "The provided TAN code is invalid for this challenge.",
   2751     .http_code = MHD_HTTP_CONFLICT
   2752   },
   2753 
   2754   {
   2755     /* 2126 */
   2756     .ec = TALER_EC_MERCHANT_TAN_CHALLENGE_UNKNOWN,
   2757     .hint = "The backend is not aware of the specified MFA challenge.",
   2758     .http_code = MHD_HTTP_NOT_FOUND
   2759   },
   2760 
   2761   {
   2762     /* 2127 */
   2763     .ec = TALER_EC_MERCHANT_TAN_TOO_MANY_ATTEMPTS,
   2764     .hint =
   2765       "There have been too many attempts to solve the challenge. A new TAN must be requested.",
   2766     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   2767   },
   2768 
   2769   {
   2770     /* 2128 */
   2771     .ec = TALER_EC_MERCHANT_TAN_MFA_HELPER_EXEC_FAILED,
   2772     .hint =
   2773       "The backend failed to launch a helper process required for the multi-factor authentication step. The backend operator should check the logs and fix the Taler merchant backend configuration.",
   2774     .http_code = MHD_HTTP_BAD_GATEWAY
   2775   },
   2776 
   2777   {
   2778     /* 2129 */
   2779     .ec = TALER_EC_MERCHANT_TAN_CHALLENGE_SOLVED,
   2780     .hint =
   2781       "The challenge was already solved. Thus, we refuse to send it again.",
   2782     .http_code = MHD_HTTP_GONE
   2783   },
   2784 
   2785   {
   2786     /* 2130 */
   2787     .ec = TALER_EC_MERCHANT_TAN_TOO_EARLY,
   2788     .hint =
   2789       "It is too early to request another transmission of the challenge. The client should wait and see if they received the previous challenge.",
   2790     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   2791   },
   2792 
   2793   {
   2794     /* 2131 */
   2795     .ec = TALER_EC_MERCHANT_MFA_FORBIDDEN,
   2796     .hint =
   2797       "There have been too many attempts to solve MFA. The client may attempt again in the future.",
   2798     .http_code = MHD_HTTP_FORBIDDEN
   2799   },
   2800 
   2801   {
   2802     /* 2132 */
   2803     .ec = TALER_EC_MERCHANT_TAN_ADDRESS_UNUSABLE,
   2804     .hint =
   2805       "The transmission helper rejected the address configured for this multi-factor authentication step: it is malformed, of the wrong length, not a mobile subscription, unallocated, or blocked. The address should be corrected.",
   2806     .http_code = MHD_HTTP_BAD_REQUEST
   2807   },
   2808 
   2809   {
   2810     /* 2133 */
   2811     .ec = TALER_EC_MERCHANT_TAN_ADDRESS_UNREACHABLE,
   2812     .hint =
   2813       "The address is valid but the recipient could not be reached: the handset is switched off or out of coverage, or the message expired before delivery. Retrying later may succeed.",
   2814     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
   2815   },
   2816 
   2817   {
   2818     /* 2134 */
   2819     .ec = TALER_EC_MERCHANT_TAN_HELPER_MISCONFIGURED,
   2820     .hint =
   2821       "The transmission helper is misconfigured: a required credential is absent, the configured credentials were refused by the provider, or the provider account has insufficient balance. The backend operator should check the logs and fix the Taler merchant backend configuration.",
   2822     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2823   },
   2824 
   2825   {
   2826     /* 2150 */
   2827     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_FUNDS,
   2828     .hint =
   2829       "The exchange responded saying that funds were insufficient (for example, due to double-spending).",
   2830     .http_code = MHD_HTTP_CONFLICT
   2831   },
   2832 
   2833   {
   2834     /* 2151 */
   2835     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_NOT_FOUND,
   2836     .hint =
   2837       "The denomination key used for payment is not listed among the denomination keys of the exchange.",
   2838     .http_code = MHD_HTTP_BAD_REQUEST
   2839   },
   2840 
   2841   {
   2842     /* 2152 */
   2843     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_KEY_AUDITOR_FAILURE,
   2844     .hint =
   2845       "The denomination key used for payment is not audited by an auditor approved by the merchant.",
   2846     .http_code = MHD_HTTP_BAD_REQUEST
   2847   },
   2848 
   2849   {
   2850     /* 2153 */
   2851     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AMOUNT_OVERFLOW,
   2852     .hint =
   2853       "There was an integer overflow totaling up the amounts or deposit fees in the payment.",
   2854     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2855   },
   2856 
   2857   {
   2858     /* 2154 */
   2859     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_FEES_EXCEED_PAYMENT,
   2860     .hint = "The deposit fees exceed the total value of the payment.",
   2861     .http_code = MHD_HTTP_BAD_REQUEST
   2862   },
   2863 
   2864   {
   2865     /* 2155 */
   2866     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_INSUFFICIENT_DUE_TO_FEES,
   2867     .hint =
   2868       "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.",
   2869     .http_code = MHD_HTTP_BAD_REQUEST
   2870   },
   2871 
   2872   {
   2873     /* 2156 */
   2874     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_PAYMENT_INSUFFICIENT,
   2875     .hint =
   2876       "Even if we do not consider deposit and wire fees, the payment is insufficient to satisfy the required amount for the contract.",
   2877     .http_code = MHD_HTTP_BAD_REQUEST
   2878   },
   2879 
   2880   {
   2881     /* 2157 */
   2882     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_COIN_SIGNATURE_INVALID,
   2883     .hint = "The signature over the contract of one of the coins was invalid.",
   2884     .http_code = MHD_HTTP_FORBIDDEN
   2885   },
   2886 
   2887   {
   2888     /* 2158 */
   2889     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_LOOKUP_FAILED,
   2890     .hint =
   2891       "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.",
   2892     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2893   },
   2894 
   2895   {
   2896     /* 2159 */
   2897     .ec =
   2898       TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_REFUND_DEADLINE_PAST_WIRE_TRANSFER_DEADLINE,
   2899     .hint =
   2900       "The refund deadline in the contract is after the transfer deadline.",
   2901     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2902   },
   2903 
   2904   {
   2905     /* 2160 */
   2906     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_ALREADY_PAID,
   2907     .hint = "The order was already paid (maybe by another wallet).",
   2908     .http_code = MHD_HTTP_CONFLICT
   2909   },
   2910 
   2911   {
   2912     /* 2161 */
   2913     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_OFFER_EXPIRED,
   2914     .hint = "The payment is too late, the offer has expired.",
   2915     .http_code = MHD_HTTP_GONE
   2916   },
   2917 
   2918   {
   2919     /* 2162 */
   2920     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_MERCHANT_FIELD_MISSING,
   2921     .hint =
   2922       "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.",
   2923     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2924   },
   2925 
   2926   {
   2927     /* 2163 */
   2928     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_WIRE_HASH_UNKNOWN,
   2929     .hint =
   2930       "Failed to locate merchant's account information matching the wire hash given in the proposal.",
   2931     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2932   },
   2933 
   2934   {
   2935     /* 2165 */
   2936     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DENOMINATION_DEPOSIT_EXPIRED,
   2937     .hint = "The deposit time for the denomination has expired.",
   2938     .http_code = MHD_HTTP_GONE
   2939   },
   2940 
   2941   {
   2942     /* 2166 */
   2943     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_WIRE_FEE_ADDITION_FAILED
   2944     ,
   2945     .hint =
   2946       "The exchange of the deposited coin charges a wire fee that could not be added to the total (total amount too high).",
   2947     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2948   },
   2949 
   2950   {
   2951     /* 2167 */
   2952     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_REFUNDED,
   2953     .hint =
   2954       "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.",
   2955     .http_code = MHD_HTTP_PAYMENT_REQUIRED
   2956   },
   2957 
   2958   {
   2959     /* 2168 */
   2960     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_REFUNDS_EXCEED_PAYMENTS,
   2961     .hint =
   2962       "According to our database, we have refunded more than we were paid (which should not be possible).",
   2963     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   2964   },
   2965 
   2966   {
   2967     /* 2169 */
   2968     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REFUND_AFTER_WIRE_DEADLINE,
   2969     .hint =
   2970       "The refund request is too late because it is past the wire transfer deadline of the order. The merchant must find a different way to pay back the money to the customer.",
   2971     .http_code = MHD_HTTP_GONE
   2972   },
   2973 
   2974   {
   2975     /* 2170 */
   2976     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_FAILED,
   2977     .hint = "The payment failed at the exchange.",
   2978     .http_code = MHD_HTTP_BAD_GATEWAY
   2979   },
   2980 
   2981   {
   2982     /* 2171 */
   2983     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_MISSING,
   2984     .hint =
   2985       "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.",
   2986     .http_code = MHD_HTTP_BAD_REQUEST
   2987   },
   2988 
   2989   {
   2990     /* 2172 */
   2991     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_SIZE_MISMATCH,
   2992     .hint =
   2993       "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.",
   2994     .http_code = MHD_HTTP_BAD_REQUEST
   2995   },
   2996 
   2997   {
   2998     /* 2173 */
   2999     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_VERIFICATION_FAILED,
   3000     .hint =
   3001       "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.",
   3002     .http_code = MHD_HTTP_BAD_REQUEST
   3003   },
   3004 
   3005   {
   3006     /* 2174 */
   3007     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_AGE_COMMITMENT_HASH_MISSING,
   3008     .hint =
   3009       "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.",
   3010     .http_code = MHD_HTTP_BAD_REQUEST
   3011   },
   3012 
   3013   {
   3014     /* 2175 */
   3015     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_WIRE_METHOD_UNSUPPORTED,
   3016     .hint =
   3017       "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.",
   3018     .http_code = MHD_HTTP_CONFLICT
   3019   },
   3020 
   3021   {
   3022     /* 2176 */
   3023     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_CHOICE_INDEX_MISSING,
   3024     .hint =
   3025       "The payment requires the wallet to select a choice from the choices array and pass it in the 'choice_index' field of the request.",
   3026     .http_code = MHD_HTTP_BAD_REQUEST
   3027   },
   3028 
   3029   {
   3030     /* 2177 */
   3031     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_CHOICE_INDEX_OUT_OF_BOUNDS,
   3032     .hint = "The 'choice_index' field is invalid.",
   3033     .http_code = MHD_HTTP_BAD_REQUEST
   3034   },
   3035 
   3036   {
   3037     /* 2178 */
   3038     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_INPUT_TOKENS_MISMATCH,
   3039     .hint =
   3040       "The provided 'tokens' array does not match with the required input tokens of the order.",
   3041     .http_code = MHD_HTTP_BAD_REQUEST
   3042   },
   3043 
   3044   {
   3045     /* 2179 */
   3046     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_ISSUE_SIG_INVALID,
   3047     .hint =
   3048       "Invalid token issue signature (blindly signed by merchant) for provided token.",
   3049     .http_code = MHD_HTTP_BAD_REQUEST
   3050   },
   3051 
   3052   {
   3053     /* 2180 */
   3054     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_USE_SIG_INVALID,
   3055     .hint =
   3056       "Invalid token use signature (EdDSA, signed by wallet) for provided token.",
   3057     .http_code = MHD_HTTP_BAD_REQUEST
   3058   },
   3059 
   3060   {
   3061     /* 2181 */
   3062     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_COUNT_MISMATCH,
   3063     .hint = "The provided number of tokens does not match the required number.",
   3064     .http_code = MHD_HTTP_BAD_REQUEST
   3065   },
   3066 
   3067   {
   3068     /* 2182 */
   3069     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_ENVELOPE_COUNT_MISMATCH,
   3070     .hint =
   3071       "The provided number of token envelopes does not match the specified number.",
   3072     .http_code = MHD_HTTP_BAD_REQUEST
   3073   },
   3074 
   3075   {
   3076     /* 2183 */
   3077     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_TOKEN_INVALID,
   3078     .hint =
   3079       "Invalid token because it was already used, is expired or not yet valid.",
   3080     .http_code = MHD_HTTP_CONFLICT
   3081   },
   3082 
   3083   {
   3084     /* 2184 */
   3085     .ec =
   3086       TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_TRANSACTION_LIMIT_VIOLATION,
   3087     .hint =
   3088       "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.",
   3089     .http_code = MHD_HTTP_BAD_REQUEST
   3090   },
   3091 
   3092   {
   3093     /* 2185 */
   3094     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_DONATION_AMOUNT_MISMATCH,
   3095     .hint =
   3096       "The donation amount provided in the BKPS does not match the amount of the order choice.",
   3097     .http_code = MHD_HTTP_CONFLICT
   3098   },
   3099 
   3100   {
   3101     /* 2186 */
   3102     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_EXCHANGE_LEGALLY_REFUSED,
   3103     .hint =
   3104       "Some of the exchanges involved refused the request for reasons related to legitimization. The wallet should try with coins of different exchanges. The merchant should check if they have some legitimization process pending at the exchange.",
   3105     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
   3106   },
   3107 
   3108   {
   3109     /* 2187 */
   3110     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAY_CHOICE_INDEX_MISMATCH,
   3111     .hint =
   3112       "The order was already paid, but completing a different choice than the one given in this request. The client should use the choice the order was actually paid with.",
   3113     .http_code = MHD_HTTP_CONFLICT
   3114   },
   3115 
   3116   {
   3117     /* 2200 */
   3118     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH,
   3119     .hint = "The contract hash does not match the given order ID.",
   3120     .http_code = MHD_HTTP_BAD_REQUEST
   3121   },
   3122 
   3123   {
   3124     /* 2201 */
   3125     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAID_COIN_SIGNATURE_INVALID,
   3126     .hint =
   3127       "The signature of the merchant is not valid for the given contract hash.",
   3128     .http_code = MHD_HTTP_FORBIDDEN
   3129   },
   3130 
   3131   {
   3132     /* 2225 */
   3133     .ec = TALER_EC_MERCHANT_POST_TOKEN_FAMILY_CONFLICT,
   3134     .hint = "A token family with this ID but conflicting data exists.",
   3135     .http_code = MHD_HTTP_CONFLICT
   3136   },
   3137 
   3138   {
   3139     /* 2226 */
   3140     .ec = TALER_EC_MERCHANT_PATCH_TOKEN_FAMILY_NOT_FOUND,
   3141     .hint = "The backend is unaware of a token family with the given ID.",
   3142     .http_code = MHD_HTTP_NOT_FOUND
   3143   },
   3144 
   3145   {
   3146     /* 2251 */
   3147     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_REFUND_FAILED,
   3148     .hint = "The merchant failed to send the exchange the refund request.",
   3149     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   3150   },
   3151 
   3152   {
   3153     /* 2252 */
   3154     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_EXCHANGE_LOOKUP_FAILED,
   3155     .hint = "The merchant failed to find the exchange to process the lookup.",
   3156     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   3157   },
   3158 
   3159   {
   3160     /* 2253 */
   3161     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_CONTRACT_NOT_FOUND,
   3162     .hint = "The merchant could not find the contract.",
   3163     .http_code = MHD_HTTP_NOT_FOUND
   3164   },
   3165 
   3166   {
   3167     /* 2254 */
   3168     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_REFUND_REFUSED_PAYMENT_COMPLETE
   3169     ,
   3170     .hint =
   3171       "The payment was already completed and thus cannot be aborted anymore.",
   3172     .http_code = MHD_HTTP_PRECONDITION_FAILED
   3173   },
   3174 
   3175   {
   3176     /* 2255 */
   3177     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_CONTRACT_HASH_MISSMATCH,
   3178     .hint = "The hash provided by the wallet does not match the order.",
   3179     .http_code = MHD_HTTP_FORBIDDEN
   3180   },
   3181 
   3182   {
   3183     /* 2256 */
   3184     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_ABORT_COINS_ARRAY_EMPTY,
   3185     .hint = "The array of coins cannot be empty.",
   3186     .http_code = MHD_HTTP_BAD_REQUEST
   3187   },
   3188 
   3189   {
   3190     /* 2258 */
   3191     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_AWAITING_KEYS,
   3192     .hint =
   3193       "We are waiting for the exchange to provide us with key material before checking the wire transfer.",
   3194     .http_code = MHD_HTTP_ACCEPTED
   3195   },
   3196 
   3197   {
   3198     /* 2259 */
   3199     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_AWAITING_LIST,
   3200     .hint =
   3201       "We are waiting for the exchange to provide us with the list of aggregated transactions.",
   3202     .http_code = MHD_HTTP_ACCEPTED
   3203   },
   3204 
   3205   {
   3206     /* 2260 */
   3207     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_FATAL_NO_EXCHANGE,
   3208     .hint =
   3209       "The endpoint indicated in the wire transfer does not belong to a GNU Taler exchange.",
   3210     .http_code = MHD_HTTP_OK
   3211   },
   3212 
   3213   {
   3214     /* 2261 */
   3215     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_FATAL_NOT_FOUND,
   3216     .hint =
   3217       "The exchange indicated in the wire transfer claims to know nothing about the wire transfer.",
   3218     .http_code = MHD_HTTP_UNINITIALIZED
   3219   },
   3220 
   3221   {
   3222     /* 2262 */
   3223     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_RATE_LIMITED,
   3224     .hint =
   3225       "The interaction with the exchange is delayed due to rate limiting.",
   3226     .http_code = MHD_HTTP_ACCEPTED
   3227   },
   3228 
   3229   {
   3230     /* 2263 */
   3231     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_TRANSIENT_FAILURE,
   3232     .hint =
   3233       "We experienced a transient failure in our interaction with the exchange.",
   3234     .http_code = MHD_HTTP_ACCEPTED
   3235   },
   3236 
   3237   {
   3238     /* 2264 */
   3239     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_HARD_FAILURE,
   3240     .hint =
   3241       "The response from the exchange was unacceptable and should be reviewed with an auditor.",
   3242     .http_code = MHD_HTTP_OK
   3243   },
   3244 
   3245   {
   3246     /* 2275 */
   3247     .ec = TALER_EC_MERCHANT_POST_ACCOUNTS_KYCAUTH_BANK_GATEWAY_UNREACHABLE,
   3248     .hint =
   3249       "The merchant backend failed to reach the banking gateway to shorten the wire transfer subject. This probably means that the banking gateway of the exchange is currently down. Contact the exchange operator or simply retry again later.",
   3250     .http_code = MHD_HTTP_BAD_GATEWAY
   3251   },
   3252 
   3253   {
   3254     /* 2276 */
   3255     .ec = TALER_EC_MERCHANT_POST_ACCOUNTS_EXCHANGE_TOO_OLD,
   3256     .hint =
   3257       "The merchant backend failed to reach the banking gateway to shorten the wire transfer subject. This probably means that the banking gateway of the exchange is currently down. Contact the exchange operator or simply retry again later.",
   3258     .http_code = MHD_HTTP_BAD_GATEWAY
   3259   },
   3260 
   3261   {
   3262     /* 2277 */
   3263     .ec = TALER_EC_MERCHANT_POST_ACCOUNTS_KYCAUTH_EXCHANGE_UNREACHABLE,
   3264     .hint =
   3265       "The merchant backend failed to reach the specified exchange. This probably means that the exchange is currently down. Contact the exchange operator or simply retry again later.",
   3266     .http_code = MHD_HTTP_BAD_GATEWAY
   3267   },
   3268 
   3269   {
   3270     /* 2300 */
   3271     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_NOT_FOUND,
   3272     .hint =
   3273       "We could not claim the order because the backend is unaware of it.",
   3274     .http_code = MHD_HTTP_NOT_FOUND
   3275   },
   3276 
   3277   {
   3278     /* 2301 */
   3279     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_ALREADY_CLAIMED,
   3280     .hint =
   3281       "We could not claim the order because someone else claimed it first.",
   3282     .http_code = MHD_HTTP_CONFLICT
   3283   },
   3284 
   3285   {
   3286     /* 2302 */
   3287     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_CLIENT_INTERNAL_FAILURE,
   3288     .hint = "The client-side experienced an internal failure.",
   3289     .http_code = MHD_HTTP_UNINITIALIZED
   3290   },
   3291 
   3292   {
   3293     /* 2303 */
   3294     .ec = TALER_EC_MERCHANT_POST_ORDERS_UNCLAIM_SIGNATURE_INVALID,
   3295     .hint =
   3296       "The unclaim signature of the wallet is not valid for the given contract hash.",
   3297     .http_code = MHD_HTTP_FORBIDDEN
   3298   },
   3299 
   3300   {
   3301     /* 2350 */
   3302     .ec = TALER_EC_MERCHANT_POST_ORDERS_ID_REFUND_SIGNATURE_FAILED,
   3303     .hint = "The backend failed to sign the refund request.",
   3304     .http_code = MHD_HTTP_UNINITIALIZED
   3305   },
   3306 
   3307   {
   3308     /* 2400 */
   3309     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_UNBLIND_FAILURE,
   3310     .hint =
   3311       "The client failed to unblind the signature returned by the merchant.",
   3312     .http_code = MHD_HTTP_UNINITIALIZED
   3313   },
   3314 
   3315   {
   3316     /* 2403 */
   3317     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_EXCHANGE_ERROR,
   3318     .hint = "The exchange returned a failure code for the withdraw operation.",
   3319     .http_code = MHD_HTTP_BAD_GATEWAY
   3320   },
   3321 
   3322   {
   3323     /* 2404 */
   3324     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_SUMMATION_FAILED,
   3325     .hint =
   3326       "The merchant failed to add up the amounts to compute the pick up value.",
   3327     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   3328   },
   3329 
   3330   {
   3331     /* 2405 */
   3332     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_HAS_EXPIRED,
   3333     .hint = "The reward expired.",
   3334     .http_code = MHD_HTTP_GONE
   3335   },
   3336 
   3337   {
   3338     /* 2406 */
   3339     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_AMOUNT_EXCEEDS_REWARD_REMAINING,
   3340     .hint =
   3341       "The requested withdraw amount exceeds the amount remaining to be picked up.",
   3342     .http_code = MHD_HTTP_BAD_REQUEST
   3343   },
   3344 
   3345   {
   3346     /* 2407 */
   3347     .ec = TALER_EC_MERCHANT_REWARD_PICKUP_DENOMINATION_UNKNOWN,
   3348     .hint =
   3349       "The merchant did not find the specified denomination key in the exchange's key set.",
   3350     .http_code = MHD_HTTP_CONFLICT
   3351   },
   3352 
   3353   {
   3354     /* 2500 */
   3355     .ec =
   3356       TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE,
   3357     .hint =
   3358       "The merchant instance has no active bank accounts configured. However, at least one bank account must be available to create new orders.",
   3359     .http_code = MHD_HTTP_NOT_FOUND
   3360   },
   3361 
   3362   {
   3363     /* 2501 */
   3364     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_NO_LOCALTIME,
   3365     .hint =
   3366       "The proposal had no timestamp and the merchant backend failed to obtain the current local time.",
   3367     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   3368   },
   3369 
   3370   {
   3371     /* 2502 */
   3372     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_PROPOSAL_PARSE_ERROR,
   3373     .hint =
   3374       "The order provided to the backend could not be parsed; likely some required fields were missing or ill-formed.",
   3375     .http_code = MHD_HTTP_BAD_REQUEST
   3376   },
   3377 
   3378   {
   3379     /* 2503 */
   3380     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ALREADY_EXISTS,
   3381     .hint =
   3382       "A conflicting order (sharing the same order identifier) already exists at this merchant backend instance.",
   3383     .http_code = MHD_HTTP_CONFLICT
   3384   },
   3385 
   3386   {
   3387     /* 2504 */
   3388     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_REFUND_AFTER_WIRE_DEADLINE,
   3389     .hint =
   3390       "The order creation request is invalid because the given wire deadline is before the refund deadline.",
   3391     .http_code = MHD_HTTP_BAD_REQUEST
   3392   },
   3393 
   3394   {
   3395     /* 2505 */
   3396     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_DELIVERY_DATE_IN_PAST,
   3397     .hint =
   3398       "The order creation request is invalid because the delivery date given is in the past.",
   3399     .http_code = MHD_HTTP_BAD_REQUEST
   3400   },
   3401 
   3402   {
   3403     /* 2506 */
   3404     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_WIRE_DEADLINE_IS_NEVER,
   3405     .hint =
   3406       "The order creation request is invalid because a wire deadline of \"never\" is not allowed.",
   3407     .http_code = MHD_HTTP_BAD_REQUEST
   3408   },
   3409 
   3410   {
   3411     /* 2507 */
   3412     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_PAY_DEADLINE_IN_PAST,
   3413     .hint =
   3414       "The order creation request is invalid because the given payment deadline is in the past.",
   3415     .http_code = MHD_HTTP_BAD_REQUEST
   3416   },
   3417 
   3418   {
   3419     /* 2508 */
   3420     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_REFUND_DEADLINE_IN_PAST,
   3421     .hint =
   3422       "The order creation request is invalid because the given refund deadline is in the past.",
   3423     .http_code = MHD_HTTP_BAD_REQUEST
   3424   },
   3425 
   3426   {
   3427     /* 2509 */
   3428     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGES_FOR_WIRE_METHOD,
   3429     .hint =
   3430       "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.",
   3431     .http_code = MHD_HTTP_CONFLICT
   3432   },
   3433 
   3434   {
   3435     /* 2510 */
   3436     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_SYNTAX_INCORRECT
   3437     ,
   3438     .hint = "One of the paths to forget is malformed.",
   3439     .http_code = MHD_HTTP_BAD_REQUEST
   3440   },
   3441 
   3442   {
   3443     /* 2511 */
   3444     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_ORDERS_ID_FORGET_PATH_NOT_FORGETTABLE,
   3445     .hint = "One of the paths to forget was not marked as forgettable.",
   3446     .http_code = MHD_HTTP_CONFLICT
   3447   },
   3448 
   3449   {
   3450     /* 2512 */
   3451     .ec =
   3452       TALER_EC_MERCHANT_POST_ORDERS_ID_REFUND_EXCHANGE_TRANSACTION_LIMIT_VIOLATION,
   3453     .hint =
   3454       "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.",
   3455     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
   3456   },
   3457 
   3458   {
   3459     /* 2513 */
   3460     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_AMOUNT_EXCEEDS_LEGAL_LIMITS,
   3461     .hint =
   3462       "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.",
   3463     .http_code = MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS
   3464   },
   3465 
   3466   {
   3467     /* 2514 */
   3468     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_NO_EXCHANGE_FOR_CURRENCY,
   3469     .hint =
   3470       "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.",
   3471     .http_code = MHD_HTTP_CONFLICT
   3472   },
   3473 
   3474   {
   3475     /* 2520 */
   3476     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_AWAITING_PAYMENT,
   3477     .hint =
   3478       "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.",
   3479     .http_code = MHD_HTTP_CONFLICT
   3480   },
   3481 
   3482   {
   3483     /* 2521 */
   3484     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_ALREADY_PAID,
   3485     .hint =
   3486       "The order provided to the backend could not be deleted as the order was already paid.",
   3487     .http_code = MHD_HTTP_CONFLICT
   3488   },
   3489 
   3490   {
   3491     /* 2525 */
   3492     .ec =
   3493       TALER_EC_MERCHANT_PRIVATE_GET_STATISTICS_REPORT_GRANULARITY_UNAVAILABLE,
   3494     .hint =
   3495       "The client requested a report granularity that is not available at the backend. Possible solutions include extending the backend code and/or the database statistic triggers to support the desired data granularity. Alternatively, the client could request a different granularity.",
   3496     .http_code = MHD_HTTP_GONE
   3497   },
   3498 
   3499   {
   3500     /* 2530 */
   3501     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_INCONSISTENT_AMOUNT,
   3502     .hint =
   3503       "The requested cumulative Taler refund is inconsistent: it is lower than the amount already awarded, exceeds the amount paid through Taler, or would make the combined Taler and external refunds exceed the full order total.",
   3504     .http_code = MHD_HTTP_CONFLICT
   3505   },
   3506 
   3507   {
   3508     /* 2531 */
   3509     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_ORDER_UNPAID,
   3510     .hint =
   3511       "Only paid orders can be refunded, and the frontend specified an unpaid order to issue a refund for.",
   3512     .http_code = MHD_HTTP_CONFLICT
   3513   },
   3514 
   3515   {
   3516     /* 2532 */
   3517     .ec =
   3518       TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_NOT_ALLOWED_BY_CONTRACT,
   3519     .hint =
   3520       "The refund delay was set to 0 and thus no refunds are ever allowed for this order.",
   3521     .http_code = MHD_HTTP_FORBIDDEN
   3522   },
   3523 
   3524   {
   3525     /* 2533 */
   3526     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_TOKEN_FAMILY_SLUG_UNKNOWN,
   3527     .hint =
   3528       "The token family slug provided in this order could not be found in the merchant database.",
   3529     .http_code = MHD_HTTP_NOT_FOUND
   3530   },
   3531 
   3532   {
   3533     /* 2534 */
   3534     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_TOKEN_FAMILY_NOT_VALID,
   3535     .hint =
   3536       "A token family referenced in this order is either expired or not valid yet.",
   3537     .http_code = MHD_HTTP_CONFLICT
   3538   },
   3539 
   3540   {
   3541     /* 2535 */
   3542     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_COLLECT_NOT_FREE,
   3543     .hint =
   3544       "The order cannot be collected by the backend as it is not a genuinely free Taler payment: the Taler amount is not zero, or the selected choice has token inputs or outputs and thus requires a customer wallet.",
   3545     .http_code = MHD_HTTP_CONFLICT
   3546   },
   3547 
   3548   {
   3549     /* 2536 */
   3550     .ec = TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_COLLECT_ALREADY_CLAIMED,
   3551     .hint =
   3552       "The order cannot be collected by the backend as it was already claimed by a customer wallet. The wallet owns the order and must execute the free payment itself.",
   3553     .http_code = MHD_HTTP_CONFLICT
   3554   },
   3555 
   3556   {
   3557     /* 2537 */
   3558     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_ORDERS_EXTERNALLY_PAID,
   3559     .hint =
   3560       "The order provided to the backend could not be deleted as it has payments that were settled outside of Taler. Deletion requires an explicit force operation.",
   3561     .http_code = MHD_HTTP_CONFLICT
   3562   },
   3563 
   3564   {
   3565     /* 2538 */
   3566     .ec =
   3567       TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_EXTERNAL_INCONSISTENT_AMOUNT,
   3568     .hint =
   3569       "The external refund could not be recorded as the cumulative externally refunded amount would exceed the full order total minus the amount already refunded through Taler.",
   3570     .http_code = MHD_HTTP_CONFLICT
   3571   },
   3572 
   3573   {
   3574     /* 2539 */
   3575     .ec =
   3576       TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_ID_REFUND_EXTERNAL_ALREADY_EXISTS,
   3577     .hint =
   3578       "An external refund with the same identifier was already recorded for this order, but with different details.",
   3579     .http_code = MHD_HTTP_CONFLICT
   3580   },
   3581 
   3582   {
   3583     /* 2550 */
   3584     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_EXCHANGE_UNKNOWN,
   3585     .hint = "The exchange says it does not know this transfer.",
   3586     .http_code = MHD_HTTP_BAD_GATEWAY
   3587   },
   3588 
   3589   {
   3590     /* 2551 */
   3591     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_REQUEST_ERROR,
   3592     .hint = "We internally failed to execute the /track/transfer request.",
   3593     .http_code = MHD_HTTP_BAD_GATEWAY
   3594   },
   3595 
   3596   {
   3597     /* 2552 */
   3598     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_TRANSFERS,
   3599     .hint =
   3600       "The amount transferred differs between what was submitted and what the exchange claimed.",
   3601     .http_code = MHD_HTTP_CONFLICT
   3602   },
   3603 
   3604   {
   3605     /* 2553 */
   3606     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_REPORTS,
   3607     .hint =
   3608       "The exchange gave conflicting information about a coin which has been wire transferred.",
   3609     .http_code = MHD_HTTP_CONFLICT
   3610   },
   3611 
   3612   {
   3613     /* 2554 */
   3614     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_BAD_WIRE_FEE,
   3615     .hint =
   3616       "The exchange charged a different wire fee than what it originally advertised, and it is higher.",
   3617     .http_code = MHD_HTTP_BAD_GATEWAY
   3618   },
   3619 
   3620   {
   3621     /* 2555 */
   3622     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_ACCOUNT_NOT_FOUND,
   3623     .hint = "We did not find the account that the transfer was made to.",
   3624     .http_code = MHD_HTTP_NOT_FOUND
   3625   },
   3626 
   3627   {
   3628     /* 2556 */
   3629     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_TRANSFERS_ALREADY_CONFIRMED,
   3630     .hint =
   3631       "The backend could not delete the transfer as the echange already replied to our inquiry about it and we have integrated the result.",
   3632     .http_code = MHD_HTTP_CONFLICT
   3633   },
   3634 
   3635   {
   3636     /* 2557 */
   3637     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TRANSFERS_CONFLICTING_SUBMISSION,
   3638     .hint =
   3639       "The backend could not persist the wire transfer due to the state of the backend. This usually means that a wire transfer with the same wire transfer subject but a different amount was previously submitted to the backend.",
   3640     .http_code = MHD_HTTP_CONFLICT
   3641   },
   3642 
   3643   {
   3644     /* 2558 */
   3645     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_TARGET_ACCOUNT_UNKNOWN,
   3646     .hint =
   3647       "The target bank account given by the exchange is not (or no longer) known at the merchant instance.",
   3648     .http_code = MHD_HTTP_UNINITIALIZED
   3649   },
   3650 
   3651   {
   3652     /* 2563 */
   3653     .ec = TALER_EC_MERCHANT_EXCHANGE_TRANSFERS_CONFLICTING_TRANSFERS,
   3654     .hint =
   3655       "The amount transferred differs between what was submitted and what the exchange claimed.",
   3656     .http_code = MHD_HTTP_UNINITIALIZED
   3657   },
   3658 
   3659   {
   3660     /* 2570 */
   3661     .ec = TALER_EC_MERCHANT_REPORT_GENERATOR_FAILED,
   3662     .hint =
   3663       "The report ID provided to the backend is not known to the backend.",
   3664     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   3665   },
   3666 
   3667   {
   3668     /* 2571 */
   3669     .ec = TALER_EC_MERCHANT_REPORT_FETCH_FAILED,
   3670     .hint = "Failed to fetch the data for the report from the backend.",
   3671     .http_code = MHD_HTTP_BAD_GATEWAY
   3672   },
   3673 
   3674   {
   3675     /* 2600 */
   3676     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_ALREADY_EXISTS,
   3677     .hint =
   3678       "The merchant backend cannot create an instance under the given identifier as one already exists. Use PATCH to modify the existing entry.",
   3679     .http_code = MHD_HTTP_CONFLICT
   3680   },
   3681 
   3682   {
   3683     /* 2601 */
   3684     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_BAD_AUTH,
   3685     .hint =
   3686       "The merchant backend cannot create an instance because the authentication configuration field is malformed.",
   3687     .http_code = MHD_HTTP_BAD_REQUEST
   3688   },
   3689 
   3690   {
   3691     /* 2602 */
   3692     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCE_AUTH_BAD_AUTH,
   3693     .hint =
   3694       "The merchant backend cannot update an instance's authentication settings because the provided authentication settings are malformed.",
   3695     .http_code = MHD_HTTP_BAD_REQUEST
   3696   },
   3697 
   3698   {
   3699     /* 2603 */
   3700     .ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_PURGE_REQUIRED,
   3701     .hint =
   3702       "The merchant backend cannot create an instance under the given identifier, the previous one was deleted but must be purged first.",
   3703     .http_code = MHD_HTTP_CONFLICT
   3704   },
   3705 
   3706   {
   3707     /* 2625 */
   3708     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_INSTANCES_PURGE_REQUIRED,
   3709     .hint =
   3710       "The merchant backend cannot update an instance under the given identifier, the previous one was deleted but must be purged first.",
   3711     .http_code = MHD_HTTP_CONFLICT
   3712   },
   3713 
   3714   {
   3715     /* 2626 */
   3716     .ec = TALER_EC_MERCHANT_PRIVATE_ACCOUNT_DELETE_UNKNOWN_ACCOUNT,
   3717     .hint =
   3718       "The bank account referenced in the requested operation was not found.",
   3719     .http_code = MHD_HTTP_NOT_FOUND
   3720   },
   3721 
   3722   {
   3723     /* 2627 */
   3724     .ec = TALER_EC_MERCHANT_PRIVATE_ACCOUNT_EXISTS,
   3725     .hint =
   3726       "The bank account specified in the request already exists at the merchant.",
   3727     .http_code = MHD_HTTP_CONFLICT
   3728   },
   3729 
   3730   {
   3731     /* 2628 */
   3732     .ec = TALER_EC_MERCHANT_PRIVATE_ACCOUNT_NOT_ELIGIBLE_FOR_EXCHANGE,
   3733     .hint =
   3734       "The bank account specified is not acceptable for this exchange. The exchange either does not support the wire method or something else about the specific account. Consult the exchange account constraints and specify a different bank account if you want to use this exchange.",
   3735     .http_code = MHD_HTTP_CONFLICT
   3736   },
   3737 
   3738   {
   3739     /* 2650 */
   3740     .ec = TALER_EC_MERCHANT_PRIVATE_POST_PRODUCTS_CONFLICT_PRODUCT_EXISTS,
   3741     .hint = "The product ID exists.",
   3742     .http_code = MHD_HTTP_CONFLICT
   3743   },
   3744 
   3745   {
   3746     /* 2651 */
   3747     .ec = TALER_EC_MERCHANT_PRIVATE_POST_CATEGORIES_CONFLICT_CATEGORY_EXISTS,
   3748     .hint = "A category with the same name exists already.",
   3749     .http_code = MHD_HTTP_CONFLICT
   3750   },
   3751 
   3752   {
   3753     /* 2660 */
   3754     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_LOST_REDUCED,
   3755     .hint =
   3756       "The update would have reduced the total amount of product lost, which is not allowed.",
   3757     .http_code = MHD_HTTP_CONFLICT
   3758   },
   3759 
   3760   {
   3761     /* 2661 */
   3762     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_LOST_EXCEEDS_STOCKS,
   3763     .hint =
   3764       "The update would have mean that more stocks were lost than what remains from total inventory after sales, which is not allowed.",
   3765     .http_code = MHD_HTTP_BAD_REQUEST
   3766   },
   3767 
   3768   {
   3769     /* 2662 */
   3770     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_STOCKED_REDUCED,
   3771     .hint =
   3772       "The update would have reduced the total amount of product in stock, which is not allowed.",
   3773     .http_code = MHD_HTTP_CONFLICT
   3774   },
   3775 
   3776   {
   3777     /* 2663 */
   3778     .ec = TALER_EC_MERCHANT_PRIVATE_PATCH_PRODUCTS_TOTAL_SOLD_REDUCED,
   3779     .hint =
   3780       "The update would have reduced the total amount of product sold, which is not allowed.",
   3781     .http_code = MHD_HTTP_CONFLICT
   3782   },
   3783 
   3784   {
   3785     /* 2670 */
   3786     .ec = TALER_EC_MERCHANT_PRIVATE_POST_PRODUCTS_LOCK_INSUFFICIENT_STOCKS,
   3787     .hint =
   3788       "The lock request is for more products than we have left (unlocked) in stock.",
   3789     .http_code = MHD_HTTP_GONE
   3790   },
   3791 
   3792   {
   3793     /* 2680 */
   3794     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_PRODUCTS_CONFLICTING_LOCK,
   3795     .hint =
   3796       "The deletion request is for a product that is locked. The product cannot be deleted until the existing offer to expires.",
   3797     .http_code = MHD_HTTP_CONFLICT
   3798   },
   3799 
   3800   {
   3801     /* 2690 */
   3802     .ec = TALER_EC_MERCHANT_PRIVATE_PRODUCT_GROUP_CONFLICTING_NAME,
   3803     .hint =
   3804       "The proposed name for the product group is already in use. You should select a different name.",
   3805     .http_code = MHD_HTTP_CONFLICT
   3806   },
   3807 
   3808   {
   3809     /* 2691 */
   3810     .ec = TALER_EC_MERCHANT_PRIVATE_MONEY_POT_CONFLICTING_NAME,
   3811     .hint =
   3812       "The proposed name for the money pot is already in use. You should select a different name.",
   3813     .http_code = MHD_HTTP_CONFLICT
   3814   },
   3815 
   3816   {
   3817     /* 2692 */
   3818     .ec = TALER_EC_MERCHANT_PRIVATE_MONEY_POT_CONFLICTING_TOTAL,
   3819     .hint =
   3820       "The total amount in the money pot is different from the amount required by the request. The client should fetch the current pot total and retry with the latest amount to succeed.",
   3821     .http_code = MHD_HTTP_CONFLICT
   3822   },
   3823 
   3824   {
   3825     /* 2700 */
   3826     .ec = TALER_EC_MERCHANT_PRIVATE_POST_RESERVES_UNSUPPORTED_WIRE_METHOD,
   3827     .hint = "The requested wire method is not supported by the exchange.",
   3828     .http_code = MHD_HTTP_CONFLICT
   3829   },
   3830 
   3831   {
   3832     /* 2701 */
   3833     .ec = TALER_EC_MERCHANT_PRIVATE_POST_RESERVES_REWARDS_NOT_ALLOWED,
   3834     .hint = "The requested exchange does not allow rewards.",
   3835     .http_code = MHD_HTTP_CONFLICT
   3836   },
   3837 
   3838   {
   3839     /* 2710 */
   3840     .ec = TALER_EC_MERCHANT_PRIVATE_DELETE_RESERVES_NO_SUCH_RESERVE,
   3841     .hint = "The reserve could not be deleted because it is unknown.",
   3842     .http_code = MHD_HTTP_NOT_FOUND
   3843   },
   3844 
   3845   {
   3846     /* 2750 */
   3847     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_EXPIRED,
   3848     .hint = "The reserve that was used to fund the rewards has expired.",
   3849     .http_code = MHD_HTTP_GONE
   3850   },
   3851 
   3852   {
   3853     /* 2751 */
   3854     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_UNKNOWN,
   3855     .hint =
   3856       "The reserve that was used to fund the rewards was not found in the DB.",
   3857     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
   3858   },
   3859 
   3860   {
   3861     /* 2752 */
   3862     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_INSUFFICIENT_FUNDS,
   3863     .hint =
   3864       "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.",
   3865     .http_code = MHD_HTTP_UNINITIALIZED
   3866   },
   3867 
   3868   {
   3869     /* 2753 */
   3870     .ec = TALER_EC_MERCHANT_PRIVATE_POST_REWARD_AUTHORIZE_RESERVE_NOT_FOUND,
   3871     .hint =
   3872       "The backend failed to find a reserve needed to authorize the reward.",
   3873     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
   3874   },
   3875 
   3876   {
   3877     /* 2800 */
   3878     .ec = TALER_EC_MERCHANT_PRIVATE_GET_ORDERS_ID_AMOUNT_ARITHMETIC_FAILURE,
   3879     .hint =
   3880       "The merchant backend encountered a failure in computing the deposit total.",
   3881     .http_code = MHD_HTTP_OK
   3882   },
   3883 
   3884   {
   3885     /* 2850 */
   3886     .ec = TALER_EC_MERCHANT_PRIVATE_POST_TEMPLATES_CONFLICT_TEMPLATE_EXISTS,
   3887     .hint = "The template ID already exists.",
   3888     .http_code = MHD_HTTP_CONFLICT
   3889   },
   3890 
   3891   {
   3892     /* 2851 */
   3893     .ec = TALER_EC_MERCHANT_PRIVATE_POST_OTP_DEVICES_CONFLICT_OTP_DEVICE_EXISTS,
   3894     .hint = "The OTP device ID already exists.",
   3895     .http_code = MHD_HTTP_CONFLICT
   3896   },
   3897 
   3898   {
   3899     /* 2860 */
   3900     .ec =
   3901       TALER_EC_MERCHANT_POST_USING_TEMPLATES_AMOUNT_CONFLICT_TEMPLATES_CONTRACT_AMOUNT,
   3902     .hint =
   3903       "Amount given in the using template and in the template contract. There is a conflict.",
   3904     .http_code = MHD_HTTP_CONFLICT
   3905   },
   3906 
   3907   {
   3908     /* 2861 */
   3909     .ec =
   3910       TALER_EC_MERCHANT_POST_USING_TEMPLATES_SUMMARY_CONFLICT_TEMPLATES_CONTRACT_SUBJECT,
   3911     .hint =
   3912       "Subject given in the using template and in the template contract. There is a conflict.",
   3913     .http_code = MHD_HTTP_CONFLICT
   3914   },
   3915 
   3916   {
   3917     /* 2862 */
   3918     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_NO_AMOUNT,
   3919     .hint =
   3920       "Amount not given in the using template and in the template contract. There is a conflict.",
   3921     .http_code = MHD_HTTP_CONFLICT
   3922   },
   3923 
   3924   {
   3925     /* 2863 */
   3926     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_NO_SUMMARY,
   3927     .hint =
   3928       "Subject not given in the using template and in the template contract. There is a conflict.",
   3929     .http_code = MHD_HTTP_CONFLICT
   3930   },
   3931 
   3932   {
   3933     /* 2864 */
   3934     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_WRONG_TYPE,
   3935     .hint =
   3936       "The selected template has a different type than the one specified in the request of the client. This may happen if the template was updated since the last time the client fetched it. The client should re-fetch the current template and send a request of the correct type.",
   3937     .http_code = MHD_HTTP_CONFLICT
   3938   },
   3939 
   3940   {
   3941     /* 2865 */
   3942     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_WRONG_PRODUCT,
   3943     .hint =
   3944       "The selected template does not allow one of the specified products to be included in the order. This may happen if the template was updated since the last time the client fetched it. The client should re-fetch the current template and send a request of the correct type.",
   3945     .http_code = MHD_HTTP_CONFLICT
   3946   },
   3947 
   3948   {
   3949     /* 2866 */
   3950     .ec = TALER_EC_MERCHANT_POST_USING_TEMPLATES_NO_CURRENCY,
   3951     .hint =
   3952       "The selected combination of products does not allow the backend to compute a price for the order in any of the supported currencies. This may happen if the template was updated since the last time the client fetched it or if the wallet assembled an unsupported combination of products. The site administrator might want to specify additional prices for products, while the client should re-fetch the current template and send a request with a combination of products for which prices exist in the same currency.",
   3953     .http_code = MHD_HTTP_CONFLICT
   3954   },
   3955 
   3956   {
   3957     /* 2900 */
   3958     .ec = TALER_EC_MERCHANT_PRIVATE_POST_WEBHOOKS_CONFLICT_WEBHOOK_EXISTS,
   3959     .hint = "The webhook ID elready exists.",
   3960     .http_code = MHD_HTTP_CONFLICT
   3961   },
   3962 
   3963   {
   3964     /* 2910 */
   3965     .ec =
   3966       TALER_EC_MERCHANT_PRIVATE_POST_PENDING_WEBHOOKS_CONFLICT_PENDING_WEBHOOK_EXISTS,
   3967     .hint = "The webhook serial elready exists.",
   3968     .http_code = MHD_HTTP_CONFLICT
   3969   },
   3970 
   3971   {
   3972     /* 3001 */
   3973     .ec = TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED,
   3974     .hint =
   3975       "The auditor refused the connection due to a lack of authorization.",
   3976     .http_code = MHD_HTTP_UNAUTHORIZED
   3977   },
   3978 
   3979   {
   3980     /* 3002 */
   3981     .ec = TALER_EC_AUDITOR_GENERIC_METHOD_NOT_ALLOWED,
   3982     .hint = "This method is not allowed here.",
   3983     .http_code = MHD_HTTP_METHOD_NOT_ALLOWED
   3984   },
   3985 
   3986   {
   3987     /* 3100 */
   3988     .ec = TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID,
   3989     .hint =
   3990       "The signature from the exchange on the deposit confirmation is invalid.",
   3991     .http_code = MHD_HTTP_FORBIDDEN
   3992   },
   3993 
   3994   {
   3995     /* 3101 */
   3996     .ec = TALER_EC_AUDITOR_EXCHANGE_SIGNING_KEY_REVOKED,
   3997     .hint =
   3998       "The exchange key used for the signature on the deposit confirmation was revoked.",
   3999     .http_code = MHD_HTTP_GONE
   4000   },
   4001 
   4002   {
   4003     /* 3102 */
   4004     .ec = TALER_EC_AUDITOR_RESOURCE_NOT_FOUND,
   4005     .hint = "The requested resource could not be found.",
   4006     .http_code = MHD_HTTP_NOT_FOUND
   4007   },
   4008 
   4009   {
   4010     /* 3103 */
   4011     .ec = TALER_EC_AUDITOR_URI_MISSING_PATH_COMPONENT,
   4012     .hint = "The URI is missing a path component.",
   4013     .http_code = MHD_HTTP_BAD_REQUEST
   4014   },
   4015 
   4016   {
   4017     /* 5101 */
   4018     .ec = TALER_EC_BANK_SAME_ACCOUNT,
   4019     .hint =
   4020       "Wire transfer attempted with credit and debit party being the same bank account.",
   4021     .http_code = MHD_HTTP_BAD_REQUEST
   4022   },
   4023 
   4024   {
   4025     /* 5102 */
   4026     .ec = TALER_EC_BANK_UNALLOWED_DEBIT,
   4027     .hint =
   4028       "Wire transfer impossible, due to financial limitation of the party that attempted the payment.",
   4029     .http_code = MHD_HTTP_CONFLICT
   4030   },
   4031 
   4032   {
   4033     /* 5103 */
   4034     .ec = TALER_EC_BANK_NEGATIVE_NUMBER_AMOUNT,
   4035     .hint =
   4036       "Negative numbers are not allowed (as value and/or fraction) to instantiate an amount object.",
   4037     .http_code = MHD_HTTP_BAD_REQUEST
   4038   },
   4039 
   4040   {
   4041     /* 5104 */
   4042     .ec = TALER_EC_BANK_NUMBER_TOO_BIG,
   4043     .hint =
   4044       "A too big number was used (as value and/or fraction) to instantiate an amount object.",
   4045     .http_code = MHD_HTTP_BAD_REQUEST
   4046   },
   4047 
   4048   {
   4049     /* 5106 */
   4050     .ec = TALER_EC_BANK_UNKNOWN_ACCOUNT,
   4051     .hint =
   4052       "The bank account referenced in the requested operation was not found.",
   4053     .http_code = MHD_HTTP_NOT_FOUND
   4054   },
   4055 
   4056   {
   4057     /* 5107 */
   4058     .ec = TALER_EC_BANK_TRANSACTION_NOT_FOUND,
   4059     .hint =
   4060       "The transaction referenced in the requested operation (typically a reject operation), was not found.",
   4061     .http_code = MHD_HTTP_NOT_FOUND
   4062   },
   4063 
   4064   {
   4065     /* 5108 */
   4066     .ec = TALER_EC_BANK_BAD_FORMAT_AMOUNT,
   4067     .hint = "Bank received a malformed amount string.",
   4068     .http_code = MHD_HTTP_BAD_REQUEST
   4069   },
   4070 
   4071   {
   4072     /* 5109 */
   4073     .ec = TALER_EC_BANK_REJECT_NO_RIGHTS,
   4074     .hint =
   4075       "The client does not own the account credited by the transaction which is to be rejected, so it has no rights do reject it.",
   4076     .http_code = MHD_HTTP_FORBIDDEN
   4077   },
   4078 
   4079   {
   4080     /* 5110 */
   4081     .ec = TALER_EC_BANK_UNMANAGED_EXCEPTION,
   4082     .hint =
   4083       "This error code is returned when no known exception types captured the exception.",
   4084     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   4085   },
   4086 
   4087   {
   4088     /* 5111 */
   4089     .ec = TALER_EC_BANK_SOFT_EXCEPTION,
   4090     .hint =
   4091       "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.",
   4092     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   4093   },
   4094 
   4095   {
   4096     /* 5112 */
   4097     .ec = TALER_EC_BANK_TRANSFER_REQUEST_UID_REUSED,
   4098     .hint =
   4099       "The request UID for a request to transfer funds has already been used, but with different details for the transfer.",
   4100     .http_code = MHD_HTTP_CONFLICT
   4101   },
   4102 
   4103   {
   4104     /* 5113 */
   4105     .ec = TALER_EC_BANK_WITHDRAWAL_OPERATION_RESERVE_SELECTION_CONFLICT,
   4106     .hint =
   4107       "The withdrawal operation already has a reserve selected.  The current request conflicts with the existing selection.",
   4108     .http_code = MHD_HTTP_CONFLICT
   4109   },
   4110 
   4111   {
   4112     /* 5114 */
   4113     .ec = TALER_EC_BANK_DUPLICATE_RESERVE_PUB_SUBJECT,
   4114     .hint =
   4115       "The wire transfer subject duplicates an existing reserve public key. But wire transfer subjects must be unique.",
   4116     .http_code = MHD_HTTP_CONFLICT
   4117   },
   4118 
   4119   {
   4120     /* 5115 */
   4121     .ec = TALER_EC_BANK_ANCIENT_TRANSACTION_GONE,
   4122     .hint =
   4123       "The client requested a transaction that is so far in the past, that it has been forgotten by the bank.",
   4124     .http_code = MHD_HTTP_GONE
   4125   },
   4126 
   4127   {
   4128     /* 5116 */
   4129     .ec = TALER_EC_BANK_ABORT_CONFIRM_CONFLICT,
   4130     .hint =
   4131       "The client attempted to abort a transaction that was already confirmed.",
   4132     .http_code = MHD_HTTP_CONFLICT
   4133   },
   4134 
   4135   {
   4136     /* 5117 */
   4137     .ec = TALER_EC_BANK_CONFIRM_ABORT_CONFLICT,
   4138     .hint =
   4139       "The client attempted to confirm a transaction that was already aborted.",
   4140     .http_code = MHD_HTTP_CONFLICT
   4141   },
   4142 
   4143   {
   4144     /* 5118 */
   4145     .ec = TALER_EC_BANK_REGISTER_CONFLICT,
   4146     .hint = "The client attempted to register an account with the same name.",
   4147     .http_code = MHD_HTTP_CONFLICT
   4148   },
   4149 
   4150   {
   4151     /* 5119 */
   4152     .ec = TALER_EC_BANK_POST_WITHDRAWAL_OPERATION_REQUIRED,
   4153     .hint =
   4154       "The client attempted to confirm a withdrawal operation before the wallet posted the required details.",
   4155     .http_code = MHD_HTTP_BAD_REQUEST
   4156   },
   4157 
   4158   {
   4159     /* 5120 */
   4160     .ec = TALER_EC_BANK_RESERVED_USERNAME_CONFLICT,
   4161     .hint =
   4162       "The client tried to register a new account under a reserved username (like 'admin' for example).",
   4163     .http_code = MHD_HTTP_CONFLICT
   4164   },
   4165 
   4166   {
   4167     /* 5121 */
   4168     .ec = TALER_EC_BANK_REGISTER_USERNAME_REUSE,
   4169     .hint =
   4170       "The client tried to register a new account with an username already in use.",
   4171     .http_code = MHD_HTTP_CONFLICT
   4172   },
   4173 
   4174   {
   4175     /* 5122 */
   4176     .ec = TALER_EC_BANK_REGISTER_PAYTO_URI_REUSE,
   4177     .hint =
   4178       "The client tried to register a new account with a payto:// URI already in use.",
   4179     .http_code = MHD_HTTP_CONFLICT
   4180   },
   4181 
   4182   {
   4183     /* 5123 */
   4184     .ec = TALER_EC_BANK_ACCOUNT_BALANCE_NOT_ZERO,
   4185     .hint = "The client tried to delete an account with a non null balance.",
   4186     .http_code = MHD_HTTP_CONFLICT
   4187   },
   4188 
   4189   {
   4190     /* 5124 */
   4191     .ec = TALER_EC_BANK_UNKNOWN_CREDITOR,
   4192     .hint =
   4193       "The client tried to create a transaction or an operation that credit an unknown account.",
   4194     .http_code = MHD_HTTP_CONFLICT
   4195   },
   4196 
   4197   {
   4198     /* 5125 */
   4199     .ec = TALER_EC_BANK_UNKNOWN_DEBTOR,
   4200     .hint =
   4201       "The client tried to create a transaction or an operation that debit an unknown account.",
   4202     .http_code = MHD_HTTP_CONFLICT
   4203   },
   4204 
   4205   {
   4206     /* 5126 */
   4207     .ec = TALER_EC_BANK_ACCOUNT_IS_EXCHANGE,
   4208     .hint =
   4209       "The client tried to perform an action prohibited for exchange accounts.",
   4210     .http_code = MHD_HTTP_CONFLICT
   4211   },
   4212 
   4213   {
   4214     /* 5127 */
   4215     .ec = TALER_EC_BANK_ACCOUNT_IS_NOT_EXCHANGE,
   4216     .hint =
   4217       "The client tried to perform an action reserved for exchange accounts.",
   4218     .http_code = MHD_HTTP_CONFLICT
   4219   },
   4220 
   4221   {
   4222     /* 5128 */
   4223     .ec = TALER_EC_BANK_BAD_CONVERSION,
   4224     .hint = "Received currency conversion is wrong.",
   4225     .http_code = MHD_HTTP_CONFLICT
   4226   },
   4227 
   4228   {
   4229     /* 5129 */
   4230     .ec = TALER_EC_BANK_MISSING_TAN_INFO,
   4231     .hint =
   4232       "The account referenced in this operation is missing tan info for the chosen channel.",
   4233     .http_code = MHD_HTTP_CONFLICT
   4234   },
   4235 
   4236   {
   4237     /* 5130 */
   4238     .ec = TALER_EC_BANK_CONFIRM_INCOMPLETE,
   4239     .hint =
   4240       "The client attempted to confirm a transaction with incomplete info.",
   4241     .http_code = MHD_HTTP_CONFLICT
   4242   },
   4243 
   4244   {
   4245     /* 5131 */
   4246     .ec = TALER_EC_BANK_TAN_RATE_LIMITED,
   4247     .hint =
   4248       "The request rate is too high. The server is refusing requests to guard against brute-force attacks.",
   4249     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   4250   },
   4251 
   4252   {
   4253     /* 5132 */
   4254     .ec = TALER_EC_BANK_TAN_CHANNEL_NOT_SUPPORTED,
   4255     .hint = "This TAN channel is not supported.",
   4256     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   4257   },
   4258 
   4259   {
   4260     /* 5133 */
   4261     .ec = TALER_EC_BANK_TAN_CHANNEL_SCRIPT_FAILED,
   4262     .hint =
   4263       "Failed to send TAN using the helper script. Either script is not found, or script timeout, or script terminated with a non-successful result.",
   4264     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   4265   },
   4266 
   4267   {
   4268     /* 5134 */
   4269     .ec = TALER_EC_BANK_TAN_CHALLENGE_FAILED,
   4270     .hint = "The client's response to the challenge was invalid.",
   4271     .http_code = MHD_HTTP_FORBIDDEN
   4272   },
   4273 
   4274   {
   4275     /* 5135 */
   4276     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_LEGAL_NAME,
   4277     .hint = "A non-admin user has tried to change their legal name.",
   4278     .http_code = MHD_HTTP_CONFLICT
   4279   },
   4280 
   4281   {
   4282     /* 5136 */
   4283     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_DEBT_LIMIT,
   4284     .hint = "A non-admin user has tried to change their debt limit.",
   4285     .http_code = MHD_HTTP_CONFLICT
   4286   },
   4287 
   4288   {
   4289     /* 5137 */
   4290     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD,
   4291     .hint =
   4292       "A non-admin user has tried to change their password whihout providing the current one.",
   4293     .http_code = MHD_HTTP_CONFLICT
   4294   },
   4295 
   4296   {
   4297     /* 5138 */
   4298     .ec = TALER_EC_BANK_PATCH_BAD_OLD_PASSWORD,
   4299     .hint = "Provided old password does not match current password.",
   4300     .http_code = MHD_HTTP_CONFLICT
   4301   },
   4302 
   4303   {
   4304     /* 5139 */
   4305     .ec = TALER_EC_BANK_PATCH_ADMIN_EXCHANGE,
   4306     .hint = "An admin user has tried to become an exchange.",
   4307     .http_code = MHD_HTTP_CONFLICT
   4308   },
   4309 
   4310   {
   4311     /* 5140 */
   4312     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_CASHOUT,
   4313     .hint = "A non-admin user has tried to change their cashout account.",
   4314     .http_code = MHD_HTTP_CONFLICT
   4315   },
   4316 
   4317   {
   4318     /* 5141 */
   4319     .ec = TALER_EC_BANK_NON_ADMIN_PATCH_CONTACT,
   4320     .hint = "A non-admin user has tried to change their contact info.",
   4321     .http_code = MHD_HTTP_CONFLICT
   4322   },
   4323 
   4324   {
   4325     /* 5142 */
   4326     .ec = TALER_EC_BANK_ADMIN_CREDITOR,
   4327     .hint =
   4328       "The client tried to create a transaction that credit the admin account.",
   4329     .http_code = MHD_HTTP_CONFLICT
   4330   },
   4331 
   4332   {
   4333     /* 5143 */
   4334     .ec = TALER_EC_BANK_CHALLENGE_NOT_FOUND,
   4335     .hint = "The referenced challenge was not found.",
   4336     .http_code = MHD_HTTP_NOT_FOUND
   4337   },
   4338 
   4339   {
   4340     /* 5144 */
   4341     .ec = TALER_EC_BANK_TAN_CHALLENGE_EXPIRED,
   4342     .hint = "The referenced challenge has expired.",
   4343     .http_code = MHD_HTTP_CONFLICT
   4344   },
   4345 
   4346   {
   4347     /* 5145 */
   4348     .ec = TALER_EC_BANK_NON_ADMIN_SET_TAN_CHANNEL,
   4349     .hint = "A non-admin user has tried to create an account with 2fa.",
   4350     .http_code = MHD_HTTP_CONFLICT
   4351   },
   4352 
   4353   {
   4354     /* 5146 */
   4355     .ec = TALER_EC_BANK_NON_ADMIN_SET_MIN_CASHOUT,
   4356     .hint = "A non-admin user has tried to set their minimum cashout amount.",
   4357     .http_code = MHD_HTTP_CONFLICT
   4358   },
   4359 
   4360   {
   4361     /* 5147 */
   4362     .ec = TALER_EC_BANK_CONVERSION_AMOUNT_TO_SMALL,
   4363     .hint = "Amount of currency conversion it less than the minimum allowed.",
   4364     .http_code = MHD_HTTP_CONFLICT
   4365   },
   4366 
   4367   {
   4368     /* 5148 */
   4369     .ec = TALER_EC_BANK_AMOUNT_DIFFERS,
   4370     .hint = "Specified amount will not work for this withdrawal.",
   4371     .http_code = MHD_HTTP_CONFLICT
   4372   },
   4373 
   4374   {
   4375     /* 5149 */
   4376     .ec = TALER_EC_BANK_AMOUNT_REQUIRED,
   4377     .hint = "The backend requires an amount to be specified.",
   4378     .http_code = MHD_HTTP_CONFLICT
   4379   },
   4380 
   4381   {
   4382     /* 5150 */
   4383     .ec = TALER_EC_BANK_PASSWORD_TOO_SHORT,
   4384     .hint = "Provided password is too short.",
   4385     .http_code = MHD_HTTP_CONFLICT
   4386   },
   4387 
   4388   {
   4389     /* 5151 */
   4390     .ec = TALER_EC_BANK_PASSWORD_TOO_LONG,
   4391     .hint = "Provided password is too long.",
   4392     .http_code = MHD_HTTP_CONFLICT
   4393   },
   4394 
   4395   {
   4396     /* 5152 */
   4397     .ec = TALER_EC_BANK_ACCOUNT_LOCKED,
   4398     .hint =
   4399       "Bank account is locked and cannot authenticate using his password.",
   4400     .http_code = MHD_HTTP_FORBIDDEN
   4401   },
   4402 
   4403   {
   4404     /* 5153 */
   4405     .ec = TALER_EC_BANK_UPDATE_ABORT_CONFLICT,
   4406     .hint =
   4407       "The client attempted to update a transaction' details that was already aborted.",
   4408     .http_code = MHD_HTTP_CONFLICT
   4409   },
   4410 
   4411   {
   4412     /* 5154 */
   4413     .ec = TALER_EC_BANK_TRANSFER_WTID_REUSED,
   4414     .hint =
   4415       "The wtid for a request to transfer funds has already been used, but with a different request unpaid.",
   4416     .http_code = MHD_HTTP_CONFLICT
   4417   },
   4418 
   4419   {
   4420     /* 5155 */
   4421     .ec = TALER_EC_BANK_NON_ADMIN_SET_CONVERSION_RATE_CLASS,
   4422     .hint = "A non-admin user has tried to set their conversion rate class",
   4423     .http_code = MHD_HTTP_CONFLICT
   4424   },
   4425 
   4426   {
   4427     /* 5156 */
   4428     .ec = TALER_EC_BANK_CONVERSION_RATE_CLASS_UNKNOWN,
   4429     .hint = "The referenced conversion rate class was not found",
   4430     .http_code = MHD_HTTP_CONFLICT
   4431   },
   4432 
   4433   {
   4434     /* 5157 */
   4435     .ec = TALER_EC_BANK_NAME_REUSE,
   4436     .hint = "The client tried to use an already taken name.",
   4437     .http_code = MHD_HTTP_CONFLICT
   4438   },
   4439 
   4440   {
   4441     /* 5158 */
   4442     .ec = TALER_EC_BANK_UNSUPPORTED_SUBJECT_FORMAT,
   4443     .hint = "This subject format is not supported.",
   4444     .http_code = MHD_HTTP_CONFLICT
   4445   },
   4446 
   4447   {
   4448     /* 5159 */
   4449     .ec = TALER_EC_BANK_DERIVATION_REUSE,
   4450     .hint = "The derived subject is already used.",
   4451     .http_code = MHD_HTTP_CONFLICT
   4452   },
   4453 
   4454   {
   4455     /* 5160 */
   4456     .ec = TALER_EC_BANK_BAD_SIGNATURE,
   4457     .hint = "The provided signature is invalid.",
   4458     .http_code = MHD_HTTP_FORBIDDEN
   4459   },
   4460 
   4461   {
   4462     /* 5161 */
   4463     .ec = TALER_EC_BANK_OLD_TIMESTAMP,
   4464     .hint = "The provided timestamp is too old.",
   4465     .http_code = MHD_HTTP_CONFLICT
   4466   },
   4467 
   4468   {
   4469     /* 5162 */
   4470     .ec = TALER_EC_BANK_TRANSFER_MAPPING_REUSED,
   4471     .hint =
   4472       "The authorization_pub for a request to transfer funds has already been used for another non recurrent transfer.",
   4473     .http_code = MHD_HTTP_CONFLICT
   4474   },
   4475 
   4476   {
   4477     /* 5163 */
   4478     .ec = TALER_EC_BANK_TRANSFER_MAPPING_UNKNOWN,
   4479     .hint =
   4480       "The authorization_pub for a request to transfer funds is not currently registered.",
   4481     .http_code = MHD_HTTP_CONFLICT
   4482   },
   4483 
   4484   {
   4485     /* 6100 */
   4486     .ec = TALER_EC_SYNC_ACCOUNT_UNKNOWN,
   4487     .hint = "The sync service failed find the account in its database.",
   4488     .http_code = MHD_HTTP_NOT_FOUND
   4489   },
   4490 
   4491   {
   4492     /* 6101 */
   4493     .ec = TALER_EC_SYNC_BAD_IF_NONE_MATCH,
   4494     .hint =
   4495       "The SHA-512 hash provided in the If-None-Match header is malformed.",
   4496     .http_code = MHD_HTTP_BAD_REQUEST
   4497   },
   4498 
   4499   {
   4500     /* 6102 */
   4501     .ec = TALER_EC_SYNC_BAD_IF_MATCH,
   4502     .hint =
   4503       "The SHA-512 hash provided in the If-Match header is malformed or missing.",
   4504     .http_code = MHD_HTTP_BAD_REQUEST
   4505   },
   4506 
   4507   {
   4508     /* 6103 */
   4509     .ec = TALER_EC_SYNC_BAD_SYNC_SIGNATURE,
   4510     .hint =
   4511       "The signature provided in the \"Sync-Signature\" header is malformed or missing.",
   4512     .http_code = MHD_HTTP_BAD_REQUEST
   4513   },
   4514 
   4515   {
   4516     /* 6104 */
   4517     .ec = TALER_EC_SYNC_INVALID_SIGNATURE,
   4518     .hint =
   4519       "The signature provided in the \"Sync-Signature\" header does not match the account, old or new Etags.",
   4520     .http_code = MHD_HTTP_FORBIDDEN
   4521   },
   4522 
   4523   {
   4524     /* 6105 */
   4525     .ec = TALER_EC_SYNC_MALFORMED_CONTENT_LENGTH,
   4526     .hint = "The \"Content-length\" field for the upload is not a number.",
   4527     .http_code = MHD_HTTP_BAD_REQUEST
   4528   },
   4529 
   4530   {
   4531     /* 6106 */
   4532     .ec = TALER_EC_SYNC_EXCESSIVE_CONTENT_LENGTH,
   4533     .hint =
   4534       "The \"Content-length\" field for the upload is too big based on the server's terms of service.",
   4535     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
   4536   },
   4537 
   4538   {
   4539     /* 6107 */
   4540     .ec = TALER_EC_SYNC_OUT_OF_MEMORY_ON_CONTENT_LENGTH,
   4541     .hint =
   4542       "The server is out of memory to handle the upload. Trying again later may succeed.",
   4543     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
   4544   },
   4545 
   4546   {
   4547     /* 6108 */
   4548     .ec = TALER_EC_SYNC_INVALID_UPLOAD,
   4549     .hint = "The uploaded data does not match the Etag.",
   4550     .http_code = MHD_HTTP_BAD_REQUEST
   4551   },
   4552 
   4553   {
   4554     /* 6109 */
   4555     .ec = TALER_EC_SYNC_PAYMENT_GENERIC_TIMEOUT,
   4556     .hint =
   4557       "HTTP server experienced a timeout while awaiting promised payment.",
   4558     .http_code = MHD_HTTP_REQUEST_TIMEOUT
   4559   },
   4560 
   4561   {
   4562     /* 6110 */
   4563     .ec = TALER_EC_SYNC_PAYMENT_CREATE_BACKEND_ERROR,
   4564     .hint = "Sync could not setup the payment request with its own backend.",
   4565     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   4566   },
   4567 
   4568   {
   4569     /* 6111 */
   4570     .ec = TALER_EC_SYNC_PREVIOUS_BACKUP_UNKNOWN,
   4571     .hint =
   4572       "The sync service failed find the backup to be updated in its database.",
   4573     .http_code = MHD_HTTP_NOT_FOUND
   4574   },
   4575 
   4576   {
   4577     /* 6112 */
   4578     .ec = TALER_EC_SYNC_MISSING_CONTENT_LENGTH,
   4579     .hint = "The \"Content-length\" field for the upload is missing.",
   4580     .http_code = MHD_HTTP_BAD_REQUEST
   4581   },
   4582 
   4583   {
   4584     /* 6113 */
   4585     .ec = TALER_EC_SYNC_GENERIC_BACKEND_ERROR,
   4586     .hint = "Sync had problems communicating with its payment backend.",
   4587     .http_code = MHD_HTTP_BAD_GATEWAY
   4588   },
   4589 
   4590   {
   4591     /* 6114 */
   4592     .ec = TALER_EC_SYNC_GENERIC_BACKEND_TIMEOUT,
   4593     .hint =
   4594       "Sync experienced a timeout communicating with its payment backend.",
   4595     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
   4596   },
   4597 
   4598   {
   4599     /* 6115 */
   4600     .ec = TALER_EC_SYNC_CONFLICTING_WRITE,
   4601     .hint =
   4602       "The provided new content is based on an outdated backup: the previous write was overwritten in the meantime.",
   4603     .http_code = MHD_HTTP_CONFLICT
   4604   },
   4605 
   4606   {
   4607     /* 6116 */
   4608     .ec = TALER_EC_SYNC_INCONSISTENT_BACKUP,
   4609     .hint =
   4610       "The backup does not form a consistent linked list (e.g. the previous block does not match the given hash).",
   4611     .http_code = MHD_HTTP_CONFLICT
   4612   },
   4613 
   4614   {
   4615     /* 7000 */
   4616     .ec = TALER_EC_WALLET_EXCHANGE_PROTOCOL_VERSION_INCOMPATIBLE,
   4617     .hint =
   4618       "The wallet does not implement a version of the exchange protocol that is compatible with the protocol version of the exchange.",
   4619     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   4620   },
   4621 
   4622   {
   4623     /* 7001 */
   4624     .ec = TALER_EC_WALLET_UNEXPECTED_EXCEPTION,
   4625     .hint =
   4626       "The wallet encountered an unexpected exception.  This is likely a bug in the wallet implementation.",
   4627     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   4628   },
   4629 
   4630   {
   4631     /* 7002 */
   4632     .ec = TALER_EC_WALLET_RECEIVED_MALFORMED_RESPONSE,
   4633     .hint =
   4634       "The wallet received a response from a server, but the response can't be parsed.",
   4635     .http_code = MHD_HTTP_UNINITIALIZED
   4636   },
   4637 
   4638   {
   4639     /* 7003 */
   4640     .ec = TALER_EC_WALLET_NETWORK_ERROR,
   4641     .hint =
   4642       "The wallet tried to make a network request, but it received no response.",
   4643     .http_code = MHD_HTTP_UNINITIALIZED
   4644   },
   4645 
   4646   {
   4647     /* 7004 */
   4648     .ec = TALER_EC_WALLET_HTTP_REQUEST_THROTTLED,
   4649     .hint = "The wallet tried to make a network request, but it was throttled.",
   4650     .http_code = MHD_HTTP_UNINITIALIZED
   4651   },
   4652 
   4653   {
   4654     /* 7005 */
   4655     .ec = TALER_EC_WALLET_UNEXPECTED_REQUEST_ERROR,
   4656     .hint =
   4657       "The wallet made a request to a service, but received an error response it does not know how to handle.",
   4658     .http_code = MHD_HTTP_UNINITIALIZED
   4659   },
   4660 
   4661   {
   4662     /* 7006 */
   4663     .ec = TALER_EC_WALLET_EXCHANGE_DENOMINATIONS_INSUFFICIENT,
   4664     .hint =
   4665       "The denominations offered by the exchange are insufficient.  Likely the exchange is badly configured or not maintained.",
   4666     .http_code = MHD_HTTP_UNINITIALIZED
   4667   },
   4668 
   4669   {
   4670     /* 7007 */
   4671     .ec = TALER_EC_WALLET_CORE_API_OPERATION_UNKNOWN,
   4672     .hint = "The wallet does not support the operation requested by a client.",
   4673     .http_code = MHD_HTTP_UNINITIALIZED
   4674   },
   4675 
   4676   {
   4677     /* 7008 */
   4678     .ec = TALER_EC_WALLET_INVALID_TALER_PAY_URI,
   4679     .hint = "The given taler://pay URI is invalid.",
   4680     .http_code = MHD_HTTP_UNINITIALIZED
   4681   },
   4682 
   4683   {
   4684     /* 7009 */
   4685     .ec = TALER_EC_WALLET_EXCHANGE_COIN_SIGNATURE_INVALID,
   4686     .hint =
   4687       "The signature on a coin by the exchange's denomination key is invalid after unblinding it.",
   4688     .http_code = MHD_HTTP_UNINITIALIZED
   4689   },
   4690 
   4691   {
   4692     /* 7011 */
   4693     .ec = TALER_EC_WALLET_CORE_NOT_AVAILABLE,
   4694     .hint = "The wallet core service is not available.",
   4695     .http_code = MHD_HTTP_UNINITIALIZED
   4696   },
   4697 
   4698   {
   4699     /* 7012 */
   4700     .ec = TALER_EC_WALLET_WITHDRAWAL_OPERATION_ABORTED_BY_BANK,
   4701     .hint =
   4702       "The bank has aborted a withdrawal operation, and thus a withdrawal can't complete.",
   4703     .http_code = MHD_HTTP_UNINITIALIZED
   4704   },
   4705 
   4706   {
   4707     /* 7013 */
   4708     .ec = TALER_EC_WALLET_HTTP_REQUEST_GENERIC_TIMEOUT,
   4709     .hint = "An HTTP request made by the wallet timed out.",
   4710     .http_code = MHD_HTTP_UNINITIALIZED
   4711   },
   4712 
   4713   {
   4714     /* 7014 */
   4715     .ec = TALER_EC_WALLET_ORDER_ALREADY_CLAIMED,
   4716     .hint = "The order has already been claimed by another wallet.",
   4717     .http_code = MHD_HTTP_UNINITIALIZED
   4718   },
   4719 
   4720   {
   4721     /* 7015 */
   4722     .ec = TALER_EC_WALLET_WITHDRAWAL_GROUP_INCOMPLETE,
   4723     .hint =
   4724       "A group of withdrawal operations (typically for the same reserve at the same exchange) has errors and will be tried again later.",
   4725     .http_code = MHD_HTTP_UNINITIALIZED
   4726   },
   4727 
   4728   {
   4729     /* 7016 */
   4730     .ec = TALER_EC_WALLET_REWARD_COIN_SIGNATURE_INVALID,
   4731     .hint =
   4732       "The signature on a coin by the exchange's denomination key (obtained through the merchant via a reward) is invalid after unblinding it.",
   4733     .http_code = MHD_HTTP_UNINITIALIZED
   4734   },
   4735 
   4736   {
   4737     /* 7017 */
   4738     .ec = TALER_EC_WALLET_BANK_INTEGRATION_PROTOCOL_VERSION_INCOMPATIBLE,
   4739     .hint =
   4740       "The wallet does not implement a version of the bank integration API that is compatible with the version offered by the bank.",
   4741     .http_code = MHD_HTTP_UNINITIALIZED
   4742   },
   4743 
   4744   {
   4745     /* 7018 */
   4746     .ec = TALER_EC_WALLET_CONTRACT_TERMS_BASE_URL_MISMATCH,
   4747     .hint =
   4748       "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.",
   4749     .http_code = MHD_HTTP_UNINITIALIZED
   4750   },
   4751 
   4752   {
   4753     /* 7019 */
   4754     .ec = TALER_EC_WALLET_CONTRACT_TERMS_SIGNATURE_INVALID,
   4755     .hint = "The merchant's signature on the contract terms is invalid.",
   4756     .http_code = MHD_HTTP_UNINITIALIZED
   4757   },
   4758 
   4759   {
   4760     /* 7020 */
   4761     .ec = TALER_EC_WALLET_CONTRACT_TERMS_MALFORMED,
   4762     .hint = "The contract terms given by the merchant are malformed.",
   4763     .http_code = MHD_HTTP_UNINITIALIZED
   4764   },
   4765 
   4766   {
   4767     /* 7021 */
   4768     .ec = TALER_EC_WALLET_PENDING_OPERATION_FAILED,
   4769     .hint =
   4770       "A pending operation failed, and thus the request can't be completed.",
   4771     .http_code = MHD_HTTP_UNINITIALIZED
   4772   },
   4773 
   4774   {
   4775     /* 7022 */
   4776     .ec = TALER_EC_WALLET_PAY_MERCHANT_SERVER_ERROR,
   4777     .hint =
   4778       "A payment was attempted, but the merchant had an internal server error (5xx).",
   4779     .http_code = MHD_HTTP_UNINITIALIZED
   4780   },
   4781 
   4782   {
   4783     /* 7023 */
   4784     .ec = TALER_EC_WALLET_CRYPTO_WORKER_ERROR,
   4785     .hint = "The crypto worker failed.",
   4786     .http_code = MHD_HTTP_UNINITIALIZED
   4787   },
   4788 
   4789   {
   4790     /* 7024 */
   4791     .ec = TALER_EC_WALLET_CRYPTO_WORKER_BAD_REQUEST,
   4792     .hint = "The crypto worker received a bad request.",
   4793     .http_code = MHD_HTTP_UNINITIALIZED
   4794   },
   4795 
   4796   {
   4797     /* 7025 */
   4798     .ec = TALER_EC_WALLET_WITHDRAWAL_KYC_REQUIRED,
   4799     .hint = "A KYC step is required before withdrawal can proceed.",
   4800     .http_code = MHD_HTTP_UNINITIALIZED
   4801   },
   4802 
   4803   {
   4804     /* 7026 */
   4805     .ec = TALER_EC_WALLET_DEPOSIT_GROUP_INSUFFICIENT_BALANCE,
   4806     .hint =
   4807       "The wallet does not have sufficient balance to create a deposit group.",
   4808     .http_code = MHD_HTTP_UNINITIALIZED
   4809   },
   4810 
   4811   {
   4812     /* 7027 */
   4813     .ec = TALER_EC_WALLET_PEER_PUSH_PAYMENT_INSUFFICIENT_BALANCE,
   4814     .hint =
   4815       "The wallet does not have sufficient balance to create a peer push payment.",
   4816     .http_code = MHD_HTTP_UNINITIALIZED
   4817   },
   4818 
   4819   {
   4820     /* 7028 */
   4821     .ec = TALER_EC_WALLET_PEER_PULL_PAYMENT_INSUFFICIENT_BALANCE,
   4822     .hint =
   4823       "The wallet does not have sufficient balance to pay for an invoice.",
   4824     .http_code = MHD_HTTP_UNINITIALIZED
   4825   },
   4826 
   4827   {
   4828     /* 7029 */
   4829     .ec = TALER_EC_WALLET_REFRESH_GROUP_INCOMPLETE,
   4830     .hint =
   4831       "A group of refresh operations has errors and will be tried again later.",
   4832     .http_code = MHD_HTTP_UNINITIALIZED
   4833   },
   4834 
   4835   {
   4836     /* 7030 */
   4837     .ec = TALER_EC_WALLET_EXCHANGE_BASE_URL_MISMATCH,
   4838     .hint =
   4839       "The exchange's self-reported base URL does not match the one that the wallet is using.",
   4840     .http_code = MHD_HTTP_UNINITIALIZED
   4841   },
   4842 
   4843   {
   4844     /* 7031 */
   4845     .ec = TALER_EC_WALLET_ORDER_ALREADY_PAID,
   4846     .hint = "The order has already been paid by another wallet.",
   4847     .http_code = MHD_HTTP_UNINITIALIZED
   4848   },
   4849 
   4850   {
   4851     /* 7032 */
   4852     .ec = TALER_EC_WALLET_EXCHANGE_UNAVAILABLE,
   4853     .hint =
   4854       "An exchange that is required for some request is currently not available.",
   4855     .http_code = MHD_HTTP_UNINITIALIZED
   4856   },
   4857 
   4858   {
   4859     /* 7033 */
   4860     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_USED,
   4861     .hint =
   4862       "An exchange entry is still used by the exchange, thus it can't be deleted without purging.",
   4863     .http_code = MHD_HTTP_UNINITIALIZED
   4864   },
   4865 
   4866   {
   4867     /* 7034 */
   4868     .ec = TALER_EC_WALLET_DB_UNAVAILABLE,
   4869     .hint =
   4870       "The wallet database is unavailable and the wallet thus is not operational.",
   4871     .http_code = MHD_HTTP_UNINITIALIZED
   4872   },
   4873 
   4874   {
   4875     /* 7035 */
   4876     .ec = TALER_EC_WALLET_TALER_URI_MALFORMED,
   4877     .hint = "A taler:// URI is malformed and can't be parsed.",
   4878     .http_code = MHD_HTTP_UNINITIALIZED
   4879   },
   4880 
   4881   {
   4882     /* 7036 */
   4883     .ec = TALER_EC_WALLET_CORE_REQUEST_CANCELLED,
   4884     .hint =
   4885       "A wallet-core request was cancelled and thus can't provide a response.",
   4886     .http_code = MHD_HTTP_UNINITIALIZED
   4887   },
   4888 
   4889   {
   4890     /* 7037 */
   4891     .ec = TALER_EC_WALLET_EXCHANGE_TOS_NOT_ACCEPTED,
   4892     .hint =
   4893       "A wallet-core request failed because the user needs to first accept the exchange's terms of service.",
   4894     .http_code = MHD_HTTP_UNINITIALIZED
   4895   },
   4896 
   4897   {
   4898     /* 7038 */
   4899     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_UPDATE_CONFLICT,
   4900     .hint =
   4901       "An exchange entry could not be updated, as the exchange's new details conflict with the new details.",
   4902     .http_code = MHD_HTTP_UNINITIALIZED
   4903   },
   4904 
   4905   {
   4906     /* 7039 */
   4907     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_OUTDATED,
   4908     .hint = "The wallet's information about the exchange is outdated.",
   4909     .http_code = MHD_HTTP_UNINITIALIZED
   4910   },
   4911 
   4912   {
   4913     /* 7040 */
   4914     .ec = TALER_EC_WALLET_PAY_MERCHANT_KYC_MISSING,
   4915     .hint =
   4916       "The merchant needs to do KYC first, the payment could not be completed.",
   4917     .http_code = MHD_HTTP_UNINITIALIZED
   4918   },
   4919 
   4920   {
   4921     /* 7041 */
   4922     .ec = TALER_EC_WALLET_PEER_PULL_DEBIT_PURSE_GONE,
   4923     .hint =
   4924       "A peer-pull-debit transaction was aborted because the exchange reported the purse as gone.",
   4925     .http_code = MHD_HTTP_UNINITIALIZED
   4926   },
   4927 
   4928   {
   4929     /* 7042 */
   4930     .ec = TALER_EC_WALLET_TRANSACTION_ABORTED_BY_USER,
   4931     .hint = "A transaction was aborted on explicit request by the user.",
   4932     .http_code = MHD_HTTP_UNINITIALIZED
   4933   },
   4934 
   4935   {
   4936     /* 7043 */
   4937     .ec = TALER_EC_WALLET_TRANSACTION_ABANDONED_BY_USER,
   4938     .hint = "A transaction was abandoned on explicit request by the user.",
   4939     .http_code = MHD_HTTP_UNINITIALIZED
   4940   },
   4941 
   4942   {
   4943     /* 7044 */
   4944     .ec = TALER_EC_WALLET_PAY_MERCHANT_ORDER_GONE,
   4945     .hint =
   4946       "A payment was attempted, but the merchant claims the order is gone (likely expired).",
   4947     .http_code = MHD_HTTP_UNINITIALIZED
   4948   },
   4949 
   4950   {
   4951     /* 7045 */
   4952     .ec = TALER_EC_WALLET_EXCHANGE_ENTRY_NOT_FOUND,
   4953     .hint = "The wallet does not have an entry for the requested exchange.",
   4954     .http_code = MHD_HTTP_UNINITIALIZED
   4955   },
   4956 
   4957   {
   4958     /* 7046 */
   4959     .ec = TALER_EC_WALLET_REQUEST_TRANSACTION_STATE_UNSUPPORTED,
   4960     .hint =
   4961       "The wallet is not able to process the request due to the transaction's state.",
   4962     .http_code = MHD_HTTP_UNINITIALIZED
   4963   },
   4964 
   4965   {
   4966     /* 7047 */
   4967     .ec = TALER_EC_WALLET_TRANSACTION_PROTOCOL_VIOLATION,
   4968     .hint =
   4969       "A transaction could not be processed due to an unrecoverable protocol violation.",
   4970     .http_code = MHD_HTTP_UNINITIALIZED
   4971   },
   4972 
   4973   {
   4974     /* 7048 */
   4975     .ec = TALER_EC_WALLET_CORE_API_BAD_REQUEST,
   4976     .hint = "A parameter in the request is malformed or missing.",
   4977     .http_code = MHD_HTTP_UNINITIALIZED
   4978   },
   4979 
   4980   {
   4981     /* 7049 */
   4982     .ec = TALER_EC_WALLET_MERCHANT_ORDER_NOT_FOUND,
   4983     .hint = "The order could not be found. Maybe the merchant deleted it.",
   4984     .http_code = MHD_HTTP_UNINITIALIZED
   4985   },
   4986 
   4987   {
   4988     /* 7050 */
   4989     .ec = TALER_EC_WALLET_PAY_MERCHANT_INSUFFICIENT_BALANCE,
   4990     .hint = "The wallet's balance for paying a merchant is insufficient.",
   4991     .http_code = MHD_HTTP_UNINITIALIZED
   4992   },
   4993 
   4994   {
   4995     /* 7051 */
   4996     .ec = TALER_EC_WALLET_PURCHASE_NOT_FOUND,
   4997     .hint = "The wallet does not have a purchase for the requested order.",
   4998     .http_code = MHD_HTTP_UNINITIALIZED
   4999   },
   5000 
   5001   {
   5002     /* 7052 */
   5003     .ec = TALER_EC_WALLET_TRANSACTION_NOT_FOUND,
   5004     .hint =
   5005       "The wallet does not have a transaction with the requested transaction identifier.",
   5006     .http_code = MHD_HTTP_UNINITIALIZED
   5007   },
   5008 
   5009   {
   5010     /* 7053 */
   5011     .ec = TALER_EC_WALLET_TRANSACTION_ACTION_UNSUPPORTED,
   5012     .hint =
   5013       "The requested action is not supported for this type of transaction.",
   5014     .http_code = MHD_HTTP_UNINITIALIZED
   5015   },
   5016 
   5017   {
   5018     /* 7054 */
   5019     .ec = TALER_EC_WALLET_KYC_LIMIT_EXCEEDED,
   5020     .hint =
   5021       "The operation would exceed a limit imposed by the exchange that the user cannot raise by completing a KYC process.",
   5022     .http_code = MHD_HTTP_UNINITIALIZED
   5023   },
   5024 
   5025   {
   5026     /* 7055 */
   5027     .ec = TALER_EC_WALLET_NO_SUITABLE_EXCHANGE,
   5028     .hint =
   5029       "The wallet does not know an exchange that can be used for this operation. Check that an exchange for the requested currency has been added to the wallet.",
   5030     .http_code = MHD_HTTP_UNINITIALIZED
   5031   },
   5032 
   5033   {
   5034     /* 7056 */
   5035     .ec = TALER_EC_WALLET_BANK_ACCOUNT_NOT_FOUND,
   5036     .hint =
   5037       "The wallet does not have a known bank account with the requested identifier.",
   5038     .http_code = MHD_HTTP_UNINITIALIZED
   5039   },
   5040 
   5041   {
   5042     /* 7057 */
   5043     .ec = TALER_EC_WALLET_PEER_CONTRACT_NOT_FOUND,
   5044     .hint =
   5045       "The exchange does not know the contract of this peer-to-peer payment. It may have expired.",
   5046     .http_code = MHD_HTTP_UNINITIALIZED
   5047   },
   5048 
   5049   {
   5050     /* 7058 */
   5051     .ec = TALER_EC_WALLET_PEER_PUSH_CREDIT_PURSE_GONE,
   5052     .hint =
   5053       "The purse of this peer-to-peer push payment is gone. The sender likely aborted the payment.",
   5054     .http_code = MHD_HTTP_UNINITIALIZED
   5055   },
   5056 
   5057   {
   5058     /* 7059 */
   5059     .ec = TALER_EC_WALLET_PEER_PULL_DEBIT_ALREADY_PAID,
   5060     .hint = "This invoice has already been paid, possibly by another wallet.",
   5061     .http_code = MHD_HTTP_UNINITIALIZED
   5062   },
   5063 
   5064   {
   5065     /* 7060 */
   5066     .ec = TALER_EC_WALLET_TOKENS_IN_USE,
   5067     .hint =
   5068       "The tokens can not be deleted, as at least one of them is currently being used in a transaction.",
   5069     .http_code = MHD_HTTP_UNINITIALIZED
   5070   },
   5071 
   5072   {
   5073     /* 7061 */
   5074     .ec = TALER_EC_WALLET_DB_BACKEND_UNSUPPORTED,
   5075     .hint =
   5076       "The operation is not supported by the database backend that the wallet is currently running on.",
   5077     .http_code = MHD_HTTP_UNINITIALIZED
   5078   },
   5079 
   5080   {
   5081     /* 7062 */
   5082     .ec = TALER_EC_WALLET_MAILBOX_UNAVAILABLE,
   5083     .hint = "The wallet could not use the mailbox service.",
   5084     .http_code = MHD_HTTP_UNINITIALIZED
   5085   },
   5086 
   5087   {
   5088     /* 7063 */
   5089     .ec = TALER_EC_WALLET_ALIAS_REGISTRATION_FAILED,
   5090     .hint =
   5091       "The wallet could not register an alias with the directory service.",
   5092     .http_code = MHD_HTTP_UNINITIALIZED
   5093   },
   5094 
   5095   {
   5096     /* 7064 */
   5097     .ec = TALER_EC_WALLET_CONTRACT_TERMS_UNSUPPORTED,
   5098     .hint =
   5099       "The contract terms use a feature that this version of the wallet does not support. Updating the wallet may help.",
   5100     .http_code = MHD_HTTP_UNINITIALIZED
   5101   },
   5102 
   5103   {
   5104     /* 7065 */
   5105     .ec = TALER_EC_WALLET_EXCHANGE_SIGNATURE_INVALID,
   5106     .hint =
   5107       "The exchange served data that is not correctly signed by its master key. The wallet refuses to use this exchange.",
   5108     .http_code = MHD_HTTP_UNINITIALIZED
   5109   },
   5110 
   5111   {
   5112     /* 7066 */
   5113     .ec = TALER_EC_WALLET_EXCHANGE_KEYS_NOT_ACCEPTED,
   5114     .hint =
   5115       "The exchange presents a master public key or currency that the user has not accepted yet. The operation was refused.",
   5116     .http_code = MHD_HTTP_UNINITIALIZED
   5117   },
   5118 
   5119   {
   5120     /* 7067 */
   5121     .ec = TALER_EC_WALLET_EXCHANGE_NO_KEY_CHANGE_PENDING,
   5122     .hint =
   5123       "The wallet was asked to accept or reject a change of the exchange's keys, but the exchange does not present a new key set.",
   5124     .http_code = MHD_HTTP_UNINITIALIZED
   5125   },
   5126 
   5127   {
   5128     /* 7068 */
   5129     .ec = TALER_EC_WALLET_EXCHANGE_KEY_CHANGE_MISMATCH,
   5130     .hint =
   5131       "The key set that was confirmed is not the one that the exchange currently presents.",
   5132     .http_code = MHD_HTTP_UNINITIALIZED
   5133   },
   5134 
   5135   {
   5136     /* 8000 */
   5137     .ec = TALER_EC_ANASTASIS_GENERIC_BACKEND_TIMEOUT,
   5138     .hint = "We encountered a timeout with our payment backend.",
   5139     .http_code = MHD_HTTP_GATEWAY_TIMEOUT
   5140   },
   5141 
   5142   {
   5143     /* 8001 */
   5144     .ec = TALER_EC_ANASTASIS_GENERIC_INVALID_PAYMENT_REQUEST,
   5145     .hint = "The backend requested payment, but the request is malformed.",
   5146     .http_code = MHD_HTTP_UNINITIALIZED
   5147   },
   5148 
   5149   {
   5150     /* 8002 */
   5151     .ec = TALER_EC_ANASTASIS_GENERIC_BACKEND_ERROR,
   5152     .hint = "The backend got an unexpected reply from the payment processor.",
   5153     .http_code = MHD_HTTP_BAD_GATEWAY
   5154   },
   5155 
   5156   {
   5157     /* 8003 */
   5158     .ec = TALER_EC_ANASTASIS_GENERIC_MISSING_CONTENT_LENGTH,
   5159     .hint = "The \"Content-length\" field for the upload is missing.",
   5160     .http_code = MHD_HTTP_BAD_REQUEST
   5161   },
   5162 
   5163   {
   5164     /* 8004 */
   5165     .ec = TALER_EC_ANASTASIS_GENERIC_MALFORMED_CONTENT_LENGTH,
   5166     .hint = "The \"Content-length\" field for the upload is malformed.",
   5167     .http_code = MHD_HTTP_BAD_REQUEST
   5168   },
   5169 
   5170   {
   5171     /* 8005 */
   5172     .ec = TALER_EC_ANASTASIS_GENERIC_ORDER_CREATE_BACKEND_ERROR,
   5173     .hint = "The backend failed to setup an order with the payment processor.",
   5174     .http_code = MHD_HTTP_BAD_GATEWAY
   5175   },
   5176 
   5177   {
   5178     /* 8006 */
   5179     .ec = TALER_EC_ANASTASIS_GENERIC_PAYMENT_CHECK_UNAUTHORIZED,
   5180     .hint =
   5181       "The backend was not authorized to check for payment with the payment processor.",
   5182     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5183   },
   5184 
   5185   {
   5186     /* 8007 */
   5187     .ec = TALER_EC_ANASTASIS_GENERIC_PAYMENT_CHECK_START_FAILED,
   5188     .hint =
   5189       "The backend could not check payment status with the payment processor.",
   5190     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5191   },
   5192 
   5193   {
   5194     /* 8008 */
   5195     .ec = TALER_EC_ANASTASIS_GENERIC_PROVIDER_UNREACHABLE,
   5196     .hint = "The Anastasis provider could not be reached.",
   5197     .http_code = MHD_HTTP_UNINITIALIZED
   5198   },
   5199 
   5200   {
   5201     /* 8009 */
   5202     .ec = TALER_EC_ANASTASIS_PAYMENT_GENERIC_TIMEOUT,
   5203     .hint =
   5204       "HTTP server experienced a timeout while awaiting promised payment.",
   5205     .http_code = MHD_HTTP_REQUEST_TIMEOUT
   5206   },
   5207 
   5208   {
   5209     /* 8108 */
   5210     .ec = TALER_EC_ANASTASIS_TRUTH_UNKNOWN,
   5211     .hint = "The key share is unknown to the provider.",
   5212     .http_code = MHD_HTTP_NOT_FOUND
   5213   },
   5214 
   5215   {
   5216     /* 8109 */
   5217     .ec = TALER_EC_ANASTASIS_TRUTH_AUTHORIZATION_METHOD_NO_LONGER_SUPPORTED,
   5218     .hint =
   5219       "The authorization method used for the key share is no longer supported by the provider.",
   5220     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5221   },
   5222 
   5223   {
   5224     /* 8110 */
   5225     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_RESPONSE_REQUIRED,
   5226     .hint = "The client needs to respond to the challenge.",
   5227     .http_code = MHD_HTTP_FORBIDDEN
   5228   },
   5229 
   5230   {
   5231     /* 8111 */
   5232     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_FAILED,
   5233     .hint = "The client's response to the challenge was invalid.",
   5234     .http_code = MHD_HTTP_FORBIDDEN
   5235   },
   5236 
   5237   {
   5238     /* 8112 */
   5239     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_UNKNOWN,
   5240     .hint =
   5241       "The backend is not aware of having issued the provided challenge code. Either this is the wrong code, or it has expired.",
   5242     .http_code = MHD_HTTP_NOT_FOUND
   5243   },
   5244 
   5245   {
   5246     /* 8114 */
   5247     .ec = TALER_EC_ANASTASIS_TRUTH_AUTHORIZATION_START_FAILED,
   5248     .hint = "The backend failed to initiate the authorization process.",
   5249     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5250   },
   5251 
   5252   {
   5253     /* 8115 */
   5254     .ec = TALER_EC_ANASTASIS_TRUTH_KEY_SHARE_GONE,
   5255     .hint =
   5256       "The authorization succeeded, but the key share is no longer available.",
   5257     .http_code = MHD_HTTP_NOT_FOUND
   5258   },
   5259 
   5260   {
   5261     /* 8116 */
   5262     .ec = TALER_EC_ANASTASIS_TRUTH_ORDER_DISAPPEARED,
   5263     .hint = "The backend forgot the order we asked the client to pay for",
   5264     .http_code = MHD_HTTP_BAD_GATEWAY
   5265   },
   5266 
   5267   {
   5268     /* 8117 */
   5269     .ec = TALER_EC_ANASTASIS_TRUTH_BACKEND_EXCHANGE_BAD,
   5270     .hint = "The backend itself reported a bad exchange interaction.",
   5271     .http_code = MHD_HTTP_BAD_GATEWAY
   5272   },
   5273 
   5274   {
   5275     /* 8118 */
   5276     .ec = TALER_EC_ANASTASIS_TRUTH_UNEXPECTED_PAYMENT_STATUS,
   5277     .hint = "The backend reported a payment status we did not expect.",
   5278     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5279   },
   5280 
   5281   {
   5282     /* 8119 */
   5283     .ec = TALER_EC_ANASTASIS_TRUTH_PAYMENT_CREATE_BACKEND_ERROR,
   5284     .hint = "The backend failed to setup the order for payment.",
   5285     .http_code = MHD_HTTP_BAD_GATEWAY
   5286   },
   5287 
   5288   {
   5289     /* 8120 */
   5290     .ec = TALER_EC_ANASTASIS_TRUTH_DECRYPTION_FAILED,
   5291     .hint = "The decryption of the key share failed with the provided key.",
   5292     .http_code = MHD_HTTP_BAD_REQUEST
   5293   },
   5294 
   5295   {
   5296     /* 8121 */
   5297     .ec = TALER_EC_ANASTASIS_TRUTH_RATE_LIMITED,
   5298     .hint =
   5299       "The request rate is too high. The server is refusing requests to guard against brute-force attacks.",
   5300     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   5301   },
   5302 
   5303   {
   5304     /* 8123 */
   5305     .ec = TALER_EC_ANASTASIS_TRUTH_CHALLENGE_WRONG_METHOD,
   5306     .hint =
   5307       "A request to issue a challenge is not valid for this authentication method.",
   5308     .http_code = MHD_HTTP_BAD_REQUEST
   5309   },
   5310 
   5311   {
   5312     /* 8150 */
   5313     .ec = TALER_EC_ANASTASIS_TRUTH_UPLOAD_UUID_EXISTS,
   5314     .hint =
   5315       "The backend failed to store the key share because the UUID is already in use.",
   5316     .http_code = MHD_HTTP_CONFLICT
   5317   },
   5318 
   5319   {
   5320     /* 8151 */
   5321     .ec = TALER_EC_ANASTASIS_TRUTH_UPLOAD_METHOD_NOT_SUPPORTED,
   5322     .hint =
   5323       "The backend failed to store the key share because the authorization method is not supported.",
   5324     .http_code = MHD_HTTP_BAD_REQUEST
   5325   },
   5326 
   5327   {
   5328     /* 8200 */
   5329     .ec = TALER_EC_ANASTASIS_SMS_PHONE_INVALID,
   5330     .hint = "The provided phone number is not an acceptable number.",
   5331     .http_code = MHD_HTTP_CONFLICT
   5332   },
   5333 
   5334   {
   5335     /* 8201 */
   5336     .ec = TALER_EC_ANASTASIS_SMS_HELPER_EXEC_FAILED,
   5337     .hint = "Failed to run the SMS transmission helper process.",
   5338     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5339   },
   5340 
   5341   {
   5342     /* 8202 */
   5343     .ec = TALER_EC_ANASTASIS_SMS_HELPER_COMMAND_FAILED,
   5344     .hint =
   5345       "Provider failed to send SMS. Helper terminated with a non-successful result.",
   5346     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5347   },
   5348 
   5349   {
   5350     /* 8210 */
   5351     .ec = TALER_EC_ANASTASIS_EMAIL_INVALID,
   5352     .hint = "The provided email address is not an acceptable address.",
   5353     .http_code = MHD_HTTP_CONFLICT
   5354   },
   5355 
   5356   {
   5357     /* 8211 */
   5358     .ec = TALER_EC_ANASTASIS_EMAIL_HELPER_EXEC_FAILED,
   5359     .hint = "Failed to run the E-mail transmission helper process.",
   5360     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5361   },
   5362 
   5363   {
   5364     /* 8212 */
   5365     .ec = TALER_EC_ANASTASIS_EMAIL_HELPER_COMMAND_FAILED,
   5366     .hint =
   5367       "Provider failed to send E-mail. Helper terminated with a non-successful result.",
   5368     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5369   },
   5370 
   5371   {
   5372     /* 8220 */
   5373     .ec = TALER_EC_ANASTASIS_POST_INVALID,
   5374     .hint = "The provided postal address is not an acceptable address.",
   5375     .http_code = MHD_HTTP_CONFLICT
   5376   },
   5377 
   5378   {
   5379     /* 8221 */
   5380     .ec = TALER_EC_ANASTASIS_POST_HELPER_EXEC_FAILED,
   5381     .hint = "Failed to run the mail transmission helper process.",
   5382     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5383   },
   5384 
   5385   {
   5386     /* 8222 */
   5387     .ec = TALER_EC_ANASTASIS_POST_HELPER_COMMAND_FAILED,
   5388     .hint =
   5389       "Provider failed to send mail. Helper terminated with a non-successful result.",
   5390     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5391   },
   5392 
   5393   {
   5394     /* 8230 */
   5395     .ec = TALER_EC_ANASTASIS_IBAN_INVALID,
   5396     .hint = "The provided IBAN address is not an acceptable IBAN.",
   5397     .http_code = MHD_HTTP_CONFLICT
   5398   },
   5399 
   5400   {
   5401     /* 8231 */
   5402     .ec = TALER_EC_ANASTASIS_IBAN_MISSING_TRANSFER,
   5403     .hint =
   5404       "The provider has not yet received the IBAN wire transfer authorizing the disclosure of the key share.",
   5405     .http_code = MHD_HTTP_FORBIDDEN
   5406   },
   5407 
   5408   {
   5409     /* 8240 */
   5410     .ec = TALER_EC_ANASTASIS_TOTP_KEY_MISSING,
   5411     .hint = "The backend did not find a TOTP key in the data provided.",
   5412     .http_code = MHD_HTTP_CONFLICT
   5413   },
   5414 
   5415   {
   5416     /* 8241 */
   5417     .ec = TALER_EC_ANASTASIS_TOTP_KEY_INVALID,
   5418     .hint =
   5419       "The key provided does not satisfy the format restrictions for an Anastasis TOTP key.",
   5420     .http_code = MHD_HTTP_CONFLICT
   5421   },
   5422 
   5423   {
   5424     /* 8250 */
   5425     .ec = TALER_EC_ANASTASIS_ADDRESS_UNREACHABLE,
   5426     .hint =
   5427       "The address is valid but the recipient could not be reached: the handset is switched off or out of coverage, or the message expired before delivery. Retrying later may succeed. Used by all authorization methods that transmit a challenge via an external helper.",
   5428     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
   5429   },
   5430 
   5431   {
   5432     /* 8251 */
   5433     .ec = TALER_EC_ANASTASIS_HELPER_MISCONFIGURED,
   5434     .hint =
   5435       "The transmission helper is misconfigured: a required credential is absent, the configured credentials were refused by the provider, or the provider account has insufficient balance. The provider operator should check the logs and the service configuration. Used by all authorization methods that transmit a challenge via an external helper.",
   5436     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5437   },
   5438 
   5439   {
   5440     /* 8301 */
   5441     .ec = TALER_EC_ANASTASIS_POLICY_BAD_IF_NONE_MATCH,
   5442     .hint = "The given if-none-match header is malformed.",
   5443     .http_code = MHD_HTTP_BAD_REQUEST
   5444   },
   5445 
   5446   {
   5447     /* 8304 */
   5448     .ec = TALER_EC_ANASTASIS_POLICY_OUT_OF_MEMORY_ON_CONTENT_LENGTH,
   5449     .hint =
   5450       "The server is out of memory to handle the upload. Trying again later may succeed.",
   5451     .http_code = MHD_HTTP_CONTENT_TOO_LARGE
   5452   },
   5453 
   5454   {
   5455     /* 8305 */
   5456     .ec = TALER_EC_ANASTASIS_POLICY_BAD_SIGNATURE,
   5457     .hint =
   5458       "The signature provided in the \"Anastasis-Policy-Signature\" header is malformed or missing.",
   5459     .http_code = MHD_HTTP_BAD_REQUEST
   5460   },
   5461 
   5462   {
   5463     /* 8306 */
   5464     .ec = TALER_EC_ANASTASIS_POLICY_BAD_IF_MATCH,
   5465     .hint = "The given if-match header is malformed.",
   5466     .http_code = MHD_HTTP_BAD_REQUEST
   5467   },
   5468 
   5469   {
   5470     /* 8307 */
   5471     .ec = TALER_EC_ANASTASIS_POLICY_INVALID_UPLOAD,
   5472     .hint = "The uploaded data does not match the Etag.",
   5473     .http_code = MHD_HTTP_BAD_REQUEST
   5474   },
   5475 
   5476   {
   5477     /* 8350 */
   5478     .ec = TALER_EC_ANASTASIS_POLICY_NOT_FOUND,
   5479     .hint = "The provider is unaware of the requested policy.",
   5480     .http_code = MHD_HTTP_NOT_FOUND
   5481   },
   5482 
   5483   {
   5484     /* 8400 */
   5485     .ec = TALER_EC_ANASTASIS_REDUCER_ACTION_INVALID,
   5486     .hint = "The given action is invalid for the current state of the reducer.",
   5487     .http_code = MHD_HTTP_UNINITIALIZED
   5488   },
   5489 
   5490   {
   5491     /* 8401 */
   5492     .ec = TALER_EC_ANASTASIS_REDUCER_STATE_INVALID,
   5493     .hint = "The given state of the reducer is invalid.",
   5494     .http_code = MHD_HTTP_UNINITIALIZED
   5495   },
   5496 
   5497   {
   5498     /* 8402 */
   5499     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_INVALID,
   5500     .hint = "The given input to the reducer is invalid.",
   5501     .http_code = MHD_HTTP_UNINITIALIZED
   5502   },
   5503 
   5504   {
   5505     /* 8403 */
   5506     .ec = TALER_EC_ANASTASIS_REDUCER_AUTHENTICATION_METHOD_NOT_SUPPORTED,
   5507     .hint =
   5508       "The selected authentication method does not work for the Anastasis provider.",
   5509     .http_code = MHD_HTTP_UNINITIALIZED
   5510   },
   5511 
   5512   {
   5513     /* 8404 */
   5514     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_INVALID_FOR_STATE,
   5515     .hint = "The given input and action do not work for the current state.",
   5516     .http_code = MHD_HTTP_UNINITIALIZED
   5517   },
   5518 
   5519   {
   5520     /* 8405 */
   5521     .ec = TALER_EC_ANASTASIS_REDUCER_BACKEND_FAILURE,
   5522     .hint =
   5523       "We experienced an unexpected failure interacting with the backend.",
   5524     .http_code = MHD_HTTP_UNINITIALIZED
   5525   },
   5526 
   5527   {
   5528     /* 8406 */
   5529     .ec = TALER_EC_ANASTASIS_REDUCER_RESOURCE_MALFORMED,
   5530     .hint = "The contents of a resource file did not match our expectations.",
   5531     .http_code = MHD_HTTP_UNINITIALIZED
   5532   },
   5533 
   5534   {
   5535     /* 8407 */
   5536     .ec = TALER_EC_ANASTASIS_REDUCER_RESOURCE_MISSING,
   5537     .hint = "A required resource file is missing.",
   5538     .http_code = MHD_HTTP_UNINITIALIZED
   5539   },
   5540 
   5541   {
   5542     /* 8408 */
   5543     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_REGEX_FAILED,
   5544     .hint = "An input did not match the regular expression.",
   5545     .http_code = MHD_HTTP_UNINITIALIZED
   5546   },
   5547 
   5548   {
   5549     /* 8409 */
   5550     .ec = TALER_EC_ANASTASIS_REDUCER_INPUT_VALIDATION_FAILED,
   5551     .hint = "An input did not match the custom validation logic.",
   5552     .http_code = MHD_HTTP_UNINITIALIZED
   5553   },
   5554 
   5555   {
   5556     /* 8410 */
   5557     .ec = TALER_EC_ANASTASIS_REDUCER_POLICY_LOOKUP_FAILED,
   5558     .hint =
   5559       "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.",
   5560     .http_code = MHD_HTTP_UNINITIALIZED
   5561   },
   5562 
   5563   {
   5564     /* 8411 */
   5565     .ec = TALER_EC_ANASTASIS_REDUCER_BACKUP_PROVIDER_FAILED,
   5566     .hint = "Anastasis provider reported a fatal failure.",
   5567     .http_code = MHD_HTTP_UNINITIALIZED
   5568   },
   5569 
   5570   {
   5571     /* 8412 */
   5572     .ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_CONFIG_FAILED,
   5573     .hint =
   5574       "Anastasis provider failed to respond to the configuration request.",
   5575     .http_code = MHD_HTTP_UNINITIALIZED
   5576   },
   5577 
   5578   {
   5579     /* 8413 */
   5580     .ec = TALER_EC_ANASTASIS_REDUCER_POLICY_MALFORMED,
   5581     .hint =
   5582       "The policy we downloaded is malformed. Must have been a client error while creating the backup.",
   5583     .http_code = MHD_HTTP_UNINITIALIZED
   5584   },
   5585 
   5586   {
   5587     /* 8414 */
   5588     .ec = TALER_EC_ANASTASIS_REDUCER_NETWORK_FAILED,
   5589     .hint = "We failed to obtain the policy, likely due to a network issue.",
   5590     .http_code = MHD_HTTP_UNINITIALIZED
   5591   },
   5592 
   5593   {
   5594     /* 8415 */
   5595     .ec = TALER_EC_ANASTASIS_REDUCER_SECRET_MALFORMED,
   5596     .hint = "The recovered secret did not match the required syntax.",
   5597     .http_code = MHD_HTTP_UNINITIALIZED
   5598   },
   5599 
   5600   {
   5601     /* 8416 */
   5602     .ec = TALER_EC_ANASTASIS_REDUCER_CHALLENGE_DATA_TOO_BIG,
   5603     .hint =
   5604       "The challenge data provided is too large for the available providers.",
   5605     .http_code = MHD_HTTP_UNINITIALIZED
   5606   },
   5607 
   5608   {
   5609     /* 8417 */
   5610     .ec = TALER_EC_ANASTASIS_REDUCER_SECRET_TOO_BIG,
   5611     .hint = "The provided core secret is too large for some of the providers.",
   5612     .http_code = MHD_HTTP_UNINITIALIZED
   5613   },
   5614 
   5615   {
   5616     /* 8418 */
   5617     .ec = TALER_EC_ANASTASIS_REDUCER_PROVIDER_INVALID_CONFIG,
   5618     .hint = "The provider returned in invalid configuration.",
   5619     .http_code = MHD_HTTP_UNINITIALIZED
   5620   },
   5621 
   5622   {
   5623     /* 8419 */
   5624     .ec = TALER_EC_ANASTASIS_REDUCER_INTERNAL_ERROR,
   5625     .hint =
   5626       "The reducer encountered an internal error, likely a bug that needs to be reported.",
   5627     .http_code = MHD_HTTP_UNINITIALIZED
   5628   },
   5629 
   5630   {
   5631     /* 8420 */
   5632     .ec = TALER_EC_ANASTASIS_REDUCER_PROVIDERS_ALREADY_SYNCED,
   5633     .hint = "The reducer already synchronized with all providers.",
   5634     .http_code = MHD_HTTP_UNINITIALIZED
   5635   },
   5636 
   5637   {
   5638     /* 8606 */
   5639     .ec = TALER_EC_DONAU_GENERIC_INVALID_DENOMINATION_CIPHER_FOR_OPERATION,
   5640     .hint =
   5641       "The requested operation is not valid for the cipher used by the selected denomination.",
   5642     .http_code = MHD_HTTP_BAD_REQUEST
   5643   },
   5644 
   5645   {
   5646     /* 8607 */
   5647     .ec = TALER_EC_DONAU_GENERIC_KEYS_MISSING,
   5648     .hint =
   5649       "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.",
   5650     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
   5651   },
   5652 
   5653   {
   5654     /* 8608 */
   5655     .ec = TALER_EC_DONAU_CHARITY_SIGNATURE_INVALID,
   5656     .hint = "The signature of the charity key is not valid.",
   5657     .http_code = MHD_HTTP_FORBIDDEN
   5658   },
   5659 
   5660   {
   5661     /* 8609 */
   5662     .ec = TALER_EC_DONAU_CHARITY_NOT_FOUND,
   5663     .hint = "The charity is unknown.",
   5664     .http_code = MHD_HTTP_NOT_FOUND
   5665   },
   5666 
   5667   {
   5668     /* 8610 */
   5669     .ec = TALER_EC_DONAU_EXCEEDING_DONATION_LIMIT,
   5670     .hint =
   5671       "The donation amount specified in the request exceeds the limit of the charity.",
   5672     .http_code = MHD_HTTP_BAD_REQUEST
   5673   },
   5674 
   5675   {
   5676     /* 8611 */
   5677     .ec = TALER_EC_DONAU_GENERIC_DONATION_UNIT_UNKNOWN,
   5678     .hint =
   5679       "The Donau is not aware of the donation unit requested for the operation.",
   5680     .http_code = MHD_HTTP_NOT_FOUND
   5681   },
   5682 
   5683   {
   5684     /* 8612 */
   5685     .ec = TALER_EC_DONAU_DONATION_UNIT_HELPER_UNAVAILABLE,
   5686     .hint =
   5687       "The Donau failed to talk to the process responsible for its private donation unit keys or the helpers had no donation units (properly) configured.",
   5688     .http_code = MHD_HTTP_BAD_GATEWAY
   5689   },
   5690 
   5691   {
   5692     /* 8613 */
   5693     .ec = TALER_EC_DONAU_SIGNKEY_HELPER_UNAVAILABLE,
   5694     .hint =
   5695       "The Donau failed to talk to the process responsible for its private signing keys.",
   5696     .http_code = MHD_HTTP_BAD_GATEWAY
   5697   },
   5698 
   5699   {
   5700     /* 8614 */
   5701     .ec = TALER_EC_DONAU_SIGNKEY_HELPER_BUG,
   5702     .hint =
   5703       "The response from the online signing key helper process was malformed.",
   5704     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5705   },
   5706 
   5707   {
   5708     /* 8615 */
   5709     .ec = TALER_EC_DONAU_GENERIC_WRONG_NUMBER_OF_SEGMENTS,
   5710     .hint =
   5711       "The number of segments included in the URI does not match the number of segments expected by the endpoint.",
   5712     .http_code = MHD_HTTP_NOT_FOUND
   5713   },
   5714 
   5715   {
   5716     /* 8616 */
   5717     .ec = TALER_EC_DONAU_DONATION_RECEIPT_SIGNATURE_INVALID,
   5718     .hint = "The signature of the donation receipt is not valid.",
   5719     .http_code = MHD_HTTP_FORBIDDEN
   5720   },
   5721 
   5722   {
   5723     /* 8617 */
   5724     .ec = TALER_EC_DONAU_DONOR_IDENTIFIER_NONCE_REUSE,
   5725     .hint =
   5726       "The client reused a unique donor identifier nonce, which is not allowed.",
   5727     .http_code = MHD_HTTP_CONFLICT
   5728   },
   5729 
   5730   {
   5731     /* 8618 */
   5732     .ec = TALER_EC_DONAU_CHARITY_PUB_EXISTS,
   5733     .hint = "A charity with the same public key is already registered.",
   5734     .http_code = MHD_HTTP_NOT_FOUND
   5735   },
   5736 
   5737   {
   5738     /* 8619 */
   5739     .ec = TALER_EC_DONAU_GENERIC_DONATION_UNIT_EXPIRED,
   5740     .hint = "The donation unit has expired and cannot be used any longer.",
   5741     .http_code = MHD_HTTP_GONE
   5742   },
   5743 
   5744   {
   5745     /* 8620 */
   5746     .ec = TALER_EC_DONAU_GENERIC_DONATION_UNIT_TOO_EARLY,
   5747     .hint =
   5748       "The donation unit is not yet valid. The client should repeat the request in the future when it might succeed.",
   5749     .http_code = MHD_HTTP_TOO_EARLY
   5750   },
   5751 
   5752   {
   5753     /* 8621 */
   5754     .ec = TALER_EC_DONAU_GENERIC_DONATION_UNIT_WRONG_YEAR,
   5755     .hint =
   5756       "The donation unit is not valid for the year specified by the client.",
   5757     .http_code = MHD_HTTP_CONFLICT
   5758   },
   5759 
   5760   {
   5761     /* 9000 */
   5762     .ec = TALER_EC_LIBEUFIN_NEXUS_GENERIC_ERROR,
   5763     .hint =
   5764       "A generic error happened in the LibEuFin nexus.  See the enclose details JSON for more information.",
   5765     .http_code = MHD_HTTP_UNINITIALIZED
   5766   },
   5767 
   5768   {
   5769     /* 9001 */
   5770     .ec = TALER_EC_LIBEUFIN_NEXUS_UNCAUGHT_EXCEPTION,
   5771     .hint = "An uncaught exception happened in the LibEuFin nexus service.",
   5772     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5773   },
   5774 
   5775   {
   5776     /* 9500 */
   5777     .ec = TALER_EC_LIBEUFIN_SANDBOX_GENERIC_ERROR,
   5778     .hint =
   5779       "A generic error happened in the LibEuFin sandbox.  See the enclose details JSON for more information.",
   5780     .http_code = MHD_HTTP_UNINITIALIZED
   5781   },
   5782 
   5783   {
   5784     /* 9501 */
   5785     .ec = TALER_EC_LIBEUFIN_SANDBOX_UNCAUGHT_EXCEPTION,
   5786     .hint = "An uncaught exception happened in the LibEuFin sandbox service.",
   5787     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5788   },
   5789 
   5790   {
   5791     /* 9600 */
   5792     .ec = TALER_EC_TALDIR_METHOD_NOT_SUPPORTED,
   5793     .hint = "This validation method is not supported by the service.",
   5794     .http_code = MHD_HTTP_NOT_FOUND
   5795   },
   5796 
   5797   {
   5798     /* 9601 */
   5799     .ec = TALER_EC_TALDIR_REGISTER_RATE_LIMITED,
   5800     .hint = "Number of allowed attempts for initiating a challenge exceeded.",
   5801     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   5802   },
   5803 
   5804   {
   5805     /* 9750 */
   5806     .ec = TALER_EC_CHALLENGER_GENERIC_CLIENT_UNKNOWN,
   5807     .hint =
   5808       "The service does not know a client with the given client identifier, or the given client secret does not match it. Used where no client has been authenticated yet.",
   5809     .http_code = MHD_HTTP_NOT_FOUND
   5810   },
   5811 
   5812   {
   5813     /* 9751 */
   5814     .ec = TALER_EC_CHALLENGER_GENERIC_CLIENT_FORBIDDEN_BAD_REDIRECT_URI,
   5815     .hint = "The client is not authorized to use the given redirect URI.",
   5816     .http_code = MHD_HTTP_UNAUTHORIZED
   5817   },
   5818 
   5819   {
   5820     /* 9752 */
   5821     .ec = TALER_EC_CHALLENGER_HELPER_EXEC_FAILED,
   5822     .hint =
   5823       "The service failed to execute its helper process to send the challenge.",
   5824     .http_code = MHD_HTTP_BAD_GATEWAY
   5825   },
   5826 
   5827   {
   5828     /* 9753 */
   5829     .ec = TALER_EC_CHALLENGER_GRANT_UNKNOWN,
   5830     .hint =
   5831       "The authorization grant is unknown to the service (it could also have been redeemed already or have expired).",
   5832     .http_code = MHD_HTTP_BAD_REQUEST
   5833   },
   5834 
   5835   {
   5836     /* 9754 */
   5837     .ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE,
   5838     .hint = "The code given is not even well-formed.",
   5839     .http_code = MHD_HTTP_BAD_REQUEST
   5840   },
   5841 
   5842   {
   5843     /* 9755 */
   5844     .ec = TALER_EC_CHALLENGER_GENERIC_VALIDATION_UNKNOWN,
   5845     .hint =
   5846       "The service is not aware of the referenced validation process, or it has expired.",
   5847     .http_code = MHD_HTTP_NOT_FOUND
   5848   },
   5849 
   5850   {
   5851     /* 9756 */
   5852     .ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_INVALID_CODE,
   5853     .hint =
   5854       "Deprecated, no longer returned by any endpoint. The value stays reserved and must not be reused. Was: the code given is not valid.",
   5855     .http_code = MHD_HTTP_FORBIDDEN
   5856   },
   5857 
   5858   {
   5859     /* 9757 */
   5860     .ec = TALER_EC_CHALLENGER_TOO_MANY_ATTEMPTS,
   5861     .hint =
   5862       "Too many attempts have been made, validation is temporarily disabled for this address.",
   5863     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   5864   },
   5865 
   5866   {
   5867     /* 9758 */
   5868     .ec = TALER_EC_CHALLENGER_INVALID_PIN,
   5869     .hint = "The TAN code provided is incorrect.",
   5870     .http_code = MHD_HTTP_FORBIDDEN
   5871   },
   5872 
   5873   {
   5874     /* 9759 */
   5875     .ec = TALER_EC_CHALLENGER_MISSING_ADDRESS,
   5876     .hint =
   5877       "Deprecated since protocol v8, no longer returned by any endpoint; see CHALLENGER_NO_CHALLENGE_TRANSMITTED. The value stays reserved and must not be reused. Was: the token cannot be valid as no address was ever provided by the client.",
   5878     .http_code = MHD_HTTP_CONFLICT
   5879   },
   5880 
   5881   {
   5882     /* 9760 */
   5883     .ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_READ_ONLY,
   5884     .hint = "The client is not allowed to change the address being validated.",
   5885     .http_code = MHD_HTTP_FORBIDDEN
   5886   },
   5887 
   5888   {
   5889     /* 9761 */
   5890     .ec = TALER_EC_CHALLENGER_NO_CHALLENGE_TRANSMITTED,
   5891     .hint =
   5892       "No challenge was ever transmitted for this validation, so it cannot be solved yet. The user must provide their address first.",
   5893     .http_code = MHD_HTTP_CONFLICT
   5894   },
   5895 
   5896   {
   5897     /* 9762 */
   5898     .ec = TALER_EC_CHALLENGER_ADDRESS_RESTRICTION_VIOLATED,
   5899     .hint =
   5900       "An address field does not match the regular expression configured for it. The detail names the offending field.",
   5901     .http_code = MHD_HTTP_BAD_REQUEST
   5902   },
   5903 
   5904   {
   5905     /* 9763 */
   5906     .ec = TALER_EC_CHALLENGER_ADDRESS_RESTRICTION_MALFORMED,
   5907     .hint =
   5908       "The address restriction configured for this field is missing its regular expression or the expression failed to compile. This is a server misconfiguration.",
   5909     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5910   },
   5911 
   5912   {
   5913     /* 9764 */
   5914     .ec = TALER_EC_CHALLENGER_TOO_MANY_ADDRESS_CHANGES,
   5915     .hint =
   5916       "The number of times the address may be changed for this validation has been exhausted. The user must request a fresh nonce from the client.",
   5917     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   5918   },
   5919 
   5920   {
   5921     /* 9765 */
   5922     .ec = TALER_EC_CHALLENGER_TOO_MANY_PIN_TRANSMISSIONS,
   5923     .hint =
   5924       "The number of times the challenge may be transmitted for this validation has been exhausted. The user may still try a different address if changes remain.",
   5925     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   5926   },
   5927 
   5928   {
   5929     /* 9766 */
   5930     .ec = TALER_EC_CHALLENGER_NO_PIN_ATTEMPTS_LEFT,
   5931     .hint =
   5932       "The number of attempts to enter the TAN has been exhausted. The user may still request a retransmission or change the address.",
   5933     .http_code = MHD_HTTP_TOO_MANY_REQUESTS
   5934   },
   5935 
   5936   {
   5937     /* 9767 */
   5938     .ec = TALER_EC_CHALLENGER_CLIENT_AUTHENTICATION_FAILED,
   5939     .hint =
   5940       "Authentication of the client failed: the client identifier and client secret presented do not match a registered client. Returned where the endpoint authenticates the client, so the reply challenges for credentials.",
   5941     .http_code = MHD_HTTP_UNAUTHORIZED
   5942   },
   5943 
   5944   {
   5945     /* 9768 */
   5946     .ec = TALER_EC_CHALLENGER_TOKEN_UNKNOWN,
   5947     .hint =
   5948       "The access token presented is malformed, unknown or expired. Malformed and unknown tokens are deliberately not distinguished.",
   5949     .http_code = MHD_HTTP_UNAUTHORIZED
   5950   },
   5951 
   5952   {
   5953     /* 9769 */
   5954     .ec = TALER_EC_CHALLENGER_ADDRESS_UNUSABLE,
   5955     .hint =
   5956       "The transmission helper rejected the address the user provided: it is malformed, of the wrong length, not a mobile subscription, unallocated, or blocked. The user should correct the address and try again.",
   5957     .http_code = MHD_HTTP_BAD_REQUEST
   5958   },
   5959 
   5960   {
   5961     /* 9770 */
   5962     .ec = TALER_EC_CHALLENGER_ADDRESS_UNREACHABLE,
   5963     .hint =
   5964       "The address is valid but the recipient could not be reached: the handset is switched off or out of coverage, or the message expired before delivery. Retrying later may succeed.",
   5965     .http_code = MHD_HTTP_SERVICE_UNAVAILABLE
   5966   },
   5967 
   5968   {
   5969     /* 9771 */
   5970     .ec = TALER_EC_CHALLENGER_HELPER_MISCONFIGURED,
   5971     .hint =
   5972       "The transmission helper is misconfigured: a required credential is absent, the configured credentials were refused by the provider, or the provider account has insufficient balance. The operator should check the logs and the service configuration.",
   5973     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   5974   },
   5975 
   5976   {
   5977     /* 9800 */
   5978     .ec = TALER_EC_PAIVANA_PAYMENT_MISSING,
   5979     .hint =
   5980       "The request is invalid as the specified order is unpaid. The client should only call this endpoint after paying the order.",
   5981     .http_code = MHD_HTTP_CONFLICT
   5982   },
   5983 
   5984   {
   5985     /* 9801 */
   5986     .ec = TALER_EC_PAIVANA_BACKEND_REFUSED,
   5987     .hint =
   5988       "The merchant backend refused our request to check the payment status. The backend is either down or Paivana is configured badly. The system administrator should check the logs.",
   5989     .http_code = MHD_HTTP_BAD_GATEWAY
   5990   },
   5991 
   5992   {
   5993     /* 9802 */
   5994     .ec = TALER_EC_PAIVANA_ORDER_UNKNOWN,
   5995     .hint =
   5996       "The order specified in the request is unknown to the backend. The client must instantiate the Paivana template first and pay the order before calling this endpoint.",
   5997     .http_code = MHD_HTTP_NOT_FOUND
   5998   },
   5999 
   6000   {
   6001     /* 9803 */
   6002     .ec = TALER_EC_PAIVANA_BACKEND_ERROR,
   6003     .hint =
   6004       "The merchant backend returned an unexpected status code. This is probably a protocol incompatibility that should be reported to the developers.",
   6005     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   6006   },
   6007 
   6008   {
   6009     /* 9804 */
   6010     .ec = TALER_EC_PAIVANA_GET_ORDER_FAILED,
   6011     .hint =
   6012       "Paivana failed to initialize the request to check the payment status. This should never happen. The system administrator should consult the logs.",
   6013     .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
   6014   },
   6015 
   6016   {
   6017     /* 9805 */
   6018     .ec = TALER_EC_PAIVANA_WRONG_ORDER,
   6019     .hint =
   6020       "The specified order does not match the specified Website or nonce and thus the order is invalid for the given request. Clients should pay for the correct order for access to the resource.",
   6021     .http_code = MHD_HTTP_CONFLICT
   6022   },
   6023 
   6024   {
   6025     /* 9806 */
   6026     .ec = TALER_EC_PAIVANA_TOO_LATE,
   6027     .hint =
   6028       "The specified expiration time for the cookie is longer than what the purchase allows. The request may succeed with a shorter expiration time. Alternatively, the user may need to purchase access again.",
   6029     .http_code = MHD_HTTP_GONE
   6030   },
   6031 
   6032   {
   6033     /* 9807 */
   6034     .ec = TALER_EC_PAIVANA_TEMPLATE_UNKNOWN,
   6035     .hint =
   6036       "The payment template specified in the request is unknown to the backend.",
   6037     .http_code = MHD_HTTP_NOT_FOUND
   6038   },
   6039 
   6040   {
   6041     /* 9808 */
   6042     .ec = TALER_EC_PAIVANA_PAYWALL_DISABLED,
   6043     .hint =
   6044       "The paywall functionality is currently disabled. Thus, proofs of payment are unnecessary and also not supported.",
   6045     .http_code = MHD_HTTP_NOT_IMPLEMENTED
   6046   },
   6047 
   6048   {
   6049     /* 9809 */
   6050     .ec = TALER_EC_PAIVANA_INVALID_TARGET,
   6051     .hint =
   6052       "The website specified in the request is not acceptable for this backend. Somehow the client must have specified an invalid website which is not configured for this Paivana reverse proxy and thus not eligible as a target for the redirect. A developer should check how the client computed the fulfillment_url of the order and fix it.",
   6053     .http_code = MHD_HTTP_CONFLICT
   6054   },
   6055 
   6056   {
   6057     /* 9999 */
   6058     .ec = TALER_EC_END,
   6059     .hint = "End of error code range.",
   6060     .http_code = MHD_HTTP_UNINITIALIZED
   6061   },
   6062 
   6063 
   6064 };
   6065 
   6066 
   6067 /**
   6068  * The length of @e code_hint_pairs.
   6069  */
   6070 static const unsigned int code_hint_pairs_length = 782;
   6071 
   6072 
   6073 const char *
   6074 TALER_ErrorCode_get_hint (enum TALER_ErrorCode ec)
   6075 {
   6076   unsigned int lower = 0;
   6077   unsigned int upper = code_hint_pairs_length - 1;
   6078   unsigned int mid = upper / 2;
   6079   while (lower <= upper)
   6080   {
   6081     mid = (upper + lower) / 2;
   6082     if (code_hint_pairs[mid].ec < ec)
   6083     {
   6084       lower = mid + 1;
   6085     }
   6086     else if (code_hint_pairs[mid].ec > ec)
   6087     {
   6088       upper = mid - 1;
   6089     }
   6090     else
   6091     {
   6092       return code_hint_pairs[mid].hint;
   6093     }
   6094   }
   6095   return "<no hint found>";
   6096 }
   6097 
   6098 
   6099 unsigned int
   6100 TALER_ErrorCode_get_http_status (enum TALER_ErrorCode ec)
   6101 {
   6102   unsigned int lower = 0;
   6103   unsigned int upper = code_hint_pairs_length - 1;
   6104   unsigned int mid = upper / 2;
   6105   while (lower <= upper)
   6106   {
   6107     mid = (upper + lower) / 2;
   6108     if (code_hint_pairs[mid].ec < ec)
   6109     {
   6110       lower = mid + 1;
   6111     }
   6112     else if (code_hint_pairs[mid].ec > ec)
   6113     {
   6114       upper = mid - 1;
   6115     }
   6116     else
   6117     {
   6118       return code_hint_pairs[mid].http_code;
   6119     }
   6120   }
   6121   return UINT_MAX;
   6122 }
   6123 
   6124 
   6125 unsigned int
   6126 TALER_ErrorCode_get_http_status_safe (enum TALER_ErrorCode ec)
   6127 {
   6128   unsigned int hc;
   6129 
   6130   hc = TALER_ErrorCode_get_http_status (ec);
   6131   if ( (0 == hc) ||
   6132        (UINT_MAX == hc) )
   6133     return MHD_HTTP_INTERNAL_SERVER_ERROR;
   6134   return hc;
   6135 }
   6136 
   6137 
   6138 void __attribute__ ((constructor))
   6139 TALER_ErrorCode_check_invariants (void);
   6140 
   6141 void __attribute__ ((constructor))
   6142 TALER_ErrorCode_check_invariants (void)
   6143 {
   6144   for (unsigned int i = 1; i < code_hint_pairs_length; i++)
   6145     GNUNET_assert (code_hint_pairs[i - 1].ec <
   6146                    code_hint_pairs[i].ec);
   6147 }