commit c31bcc979bbeeae4f3c020edc64e5c180f192262
parent de3df92139da00ff496b22a6a64897ded10dd1a4
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 27 Nov 2025 11:44:15 +0100
new ECs, fix minor leak
Diffstat:
5 files changed, 739 insertions(+), 684 deletions(-)
diff --git a/src/include/taler/taler_error_codes.h b/src/include/taler/taler_error_codes.h
@@ -63,22 +63,6 @@ enum TALER_ErrorCode
/**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_CLIENT_INTERNAL_ERROR = 2,
-
-
- /**
- * The client does not support the protocol version advertised by the server.
- * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION = 3,
-
-
- /**
* 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.
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
* (A value of 0 indicates that the error is generated client-side).
@@ -87,334 +71,6 @@ enum TALER_ErrorCode
/**
- * The operation timed out. Trying again might help. Check the network connection.
- * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_TIMEOUT = 11,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_VERSION_MALFORMED = 12,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_REPLY_MALFORMED = 13,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_CONFIGURATION_INVALID = 14,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_UNEXPECTED_REQUEST_ERROR = 15,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT = 16,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_METHOD_NOT_ALLOWED (405).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_METHOD_INVALID = 20,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_ENDPOINT_UNKNOWN = 21,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_JSON_INVALID = 22,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED = 23,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_PAYTO_URI_MALFORMED = 24,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_PARAMETER_MISSING = 25,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_PARAMETER_MALFORMED = 26,
-
-
- /**
- * The reserve public key was malformed.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_RESERVE_PUB_MALFORMED = 27,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_COMPRESSION_INVALID = 28,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED = 29,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_CURRENCY_MISMATCH = 30,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_URI_TOO_LONG (414).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_URI_TOO_LONG = 31,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_CONTENT_TOO_LARGE (413).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT = 32,
-
-
- /**
- * The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_UNAUTHORIZED = 40,
-
-
- /**
- * The service refused the request as the given authorization token is unknown. You should request a valid access token from the account owner.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_TOKEN_UNKNOWN = 41,
-
-
- /**
- * The service refused the request as the given authorization token expired. You should request a fresh authorization token from the account owner.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_TOKEN_EXPIRED = 42,
-
-
- /**
- * The service refused the request as the given authorization token is invalid or malformed. You should check that you have the right credentials.
- * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_TOKEN_MALFORMED = 43,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_FORBIDDEN = 44,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_DB_SETUP_FAILED = 50,
-
-
- /**
- * The service encountered an error event to just start the database transaction. The system administrator should check that the database is running.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_DB_START_FAILED = 51,
-
-
- /**
- * The service failed to store information in its database. The system administrator should check that the database is running and review the service logs.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_DB_STORE_FAILED = 52,
-
-
- /**
- * The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_DB_FETCH_FAILED = 53,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_DB_COMMIT_FAILED = 54,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_DB_SOFT_FAILURE = 55,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_DB_INVARIANT_FAILURE = 56,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE = 60,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH = 61,
-
-
- /**
- * The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_FAILED_COMPUTE_AMOUNT = 62,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY = 70,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_ALLOCATION_FAILURE = 71,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE = 72,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_CURL_ALLOCATION_FAILURE = 73,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_NOT_ACCEPTABLE (406).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_FAILED_TO_LOAD_TEMPLATE = 74,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_FAILED_TO_EXPAND_TEMPLATE = 75,
-
-
- /**
- * 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.
- * Returned with an HTTP status code of #MHD_HTTP_NOT_IMPLEMENTED (501).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_GENERIC_FEATURE_NOT_IMPLEMENTED = 76,
-
-
- /**
* Exchange is badly configured and thus cannot operate.
* Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
* (A value of 0 indicates that the error is generated client-side).
@@ -768,6 +424,46 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_EXCHANGE_GENERIC_TYPST_TEMPLATE_FAILURE = 1044,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_EXCHANGE_GENERIC_PDFTK_FAILURE = 1045,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_EXCHANGE_GENERIC_TYPST_CRASH = 1046,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_EXCHANGE_GENERIC_PDFTK_CRASH = 1047,
+
+
+ /**
+ * The operation timed out. Trying again might help. Check the network connection.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_TIMEOUT = 11,
+
+
+ /**
* The exchange did not find information about the specified transaction in the database.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
@@ -952,14 +648,22 @@ enum TALER_ErrorCode
/**
- * The batch withdraw included a planchet that was already withdrawn. This is not allowed.
- * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
+ * The withdraw operation included the same planchet more than once. This is not allowed.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
*/
TALER_EC_EXCHANGE_WITHDRAW_IDEMPOTENT_PLANCHET = 1175,
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_VERSION_MALFORMED = 12,
+
+
+ /**
* The signature made by the coin over the deposit permission is not valid.
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
* (A value of 0 indicates that the error is generated client-side).
@@ -1056,6 +760,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_REPLY_MALFORMED = 13,
+
+
+ /**
* The exchange encountered melt fees exceeding the melted coin's contribution.
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
@@ -1184,6 +896,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_CONFIGURATION_INVALID = 14,
+
+
+ /**
* The coin specified in the link request is unknown to the exchange.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
@@ -1240,6 +960,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_UNEXPECTED_REQUEST_ERROR = 15,
+
+
+ /**
* 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.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
@@ -1408,6 +1136,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT = 16,
+
+
+ /**
* This exchange does not allow clients to request /keys for times other than the current (exchange) time.
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
* (A value of 0 indicates that the error is generated client-side).
@@ -2352,6 +2088,22 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_CLIENT_INTERNAL_ERROR = 2,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_METHOD_NOT_ALLOWED (405).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_METHOD_INVALID = 20,
+
+
+ /**
* The backend could not find the merchant instance specified in the request.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
@@ -2614,6 +2366,7 @@ enum TALER_ErrorCode
*/
TALER_EC_MERCHANT_GENERIC_DONAU_INVALID_RESPONSE = 2032,
+
/**
* The unit referenced in the request is builtin and cannot be modified or deleted.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
@@ -2623,6 +2376,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_ENDPOINT_UNKNOWN = 21,
+
+
+ /**
* The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response.
* Returned with an HTTP status code of #MHD_HTTP_OK (200).
* (A value of 0 indicates that the error is generated client-side).
@@ -3010,6 +2771,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_JSON_INVALID = 22,
+
+
+ /**
* The contract hash does not match the given order ID.
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
@@ -3146,6 +2915,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED = 23,
+
+
+ /**
* We could not claim the order because the backend is unaware of it.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
@@ -3174,7 +2951,15 @@ enum TALER_ErrorCode
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
* (A value of 0 indicates that the error is generated client-side).
*/
- TALER_EC_MERCHANT_POST_ORDERS_ID_REFUND_SIGNATURE_FAILED = 2350,
+ TALER_EC_MERCHANT_POST_ORDERS_ID_REFUND_SIGNATURE_FAILED = 2350,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_PAYTO_URI_MALFORMED = 24,
/**
@@ -3226,6 +3011,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_PARAMETER_MISSING = 25,
+
+
+ /**
* The merchant instance has no active bank accounts configured. However, at least one bank account must be available to create new orders.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
@@ -3485,6 +3278,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_PARAMETER_MALFORMED = 26,
+
+
+ /**
* The merchant backend cannot create an instance under the given identifier as one already exists. Use PATCH to modify the existing entry.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
@@ -3605,6 +3406,14 @@ enum TALER_ErrorCode
/**
+ * The reserve public key was malformed.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_RESERVE_PUB_MALFORMED = 27,
+
+
+ /**
* The requested wire method is not supported by the exchange.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
@@ -3661,6 +3470,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_COMPRESSION_INVALID = 28,
+
+
+ /**
* The merchant backend encountered a failure in computing the deposit total.
* Returned with an HTTP status code of #MHD_HTTP_OK (200).
* (A value of 0 indicates that the error is generated client-side).
@@ -3719,6 +3536,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED = 29,
+
+
+ /**
* The webhook ID elready exists.
* Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409).
* (A value of 0 indicates that the error is generated client-side).
@@ -3736,6 +3561,22 @@ enum TALER_ErrorCode
/**
+ * The client does not support the protocol version advertised by the server.
+ * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION = 3,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_CURRENCY_MISMATCH = 30,
+
+
+ /**
* The auditor refused the connection due to a lack of authorization.
* Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
* (A value of 0 indicates that the error is generated client-side).
@@ -3752,6 +3593,14 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_URI_TOO_LONG (414).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_URI_TOO_LONG = 31,
+
+
+ /**
* The signature from the exchange on the deposit confirmation is invalid.
* Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
* (A value of 0 indicates that the error is generated client-side).
@@ -3784,6 +3633,70 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_CONTENT_TOO_LARGE (413).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT = 32,
+
+
+ /**
+ * The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner.
+ * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_UNAUTHORIZED = 40,
+
+
+ /**
+ * The service refused the request as the given authorization token is unknown. You should request a valid access token from the account owner.
+ * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_TOKEN_UNKNOWN = 41,
+
+
+ /**
+ * The service refused the request as the given authorization token expired. You should request a fresh authorization token from the account owner.
+ * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_TOKEN_EXPIRED = 42,
+
+
+ /**
+ * The service refused the request as the given authorization token is invalid or malformed. You should check that you have the right credentials.
+ * Returned with an HTTP status code of #MHD_HTTP_UNAUTHORIZED (401).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_TOKEN_MALFORMED = 43,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_FORBIDDEN = 44,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_DB_SETUP_FAILED = 50,
+
+
+ /**
+ * The service encountered an error event to just start the database transaction. The system administrator should check that the database is running.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_DB_START_FAILED = 51,
+
+
+ /**
* Wire transfer attempted with credit and debit party being the same bank account.
* Returned with an HTTP status code of #MHD_HTTP_BAD_REQUEST (400).
* (A value of 0 indicates that the error is generated client-side).
@@ -4232,6 +4145,62 @@ enum TALER_ErrorCode
/**
+ * The service failed to store information in its database. The system administrator should check that the database is running and review the service logs.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_DB_STORE_FAILED = 52,
+
+
+ /**
+ * The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_DB_FETCH_FAILED = 53,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_DB_COMMIT_FAILED = 54,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_DB_SOFT_FAILURE = 55,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_DB_INVARIANT_FAILURE = 56,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE = 60,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH = 61,
+
+
+ /**
* The sync service failed find the account in its database.
* Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
* (A value of 0 indicates that the error is generated client-side).
@@ -4352,6 +4321,22 @@ enum TALER_ErrorCode
/**
+ * The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_FAILED_COMPUTE_AMOUNT = 62,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY = 70,
+
+
+ /**
* The wallet does not implement a version of the exchange protocol that is compatible with the protocol version of the exchange.
* Returned with an HTTP status code of #MHD_HTTP_NOT_IMPLEMENTED (501).
* (A value of 0 indicates that the error is generated client-side).
@@ -4432,14 +4417,6 @@ enum TALER_ErrorCode
/**
- * The exchange does not know about the reserve (yet), and thus withdrawal can't progress.
- * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404).
- * (A value of 0 indicates that the error is generated client-side).
- */
- TALER_EC_WALLET_EXCHANGE_WITHDRAW_RESERVE_UNKNOWN_AT_EXCHANGE = 7010,
-
-
- /**
* The wallet core service is not available.
* Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0).
* (A value of 0 indicates that the error is generated client-side).
@@ -4744,6 +4721,54 @@ enum TALER_ErrorCode
/**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_ALLOCATION_FAILURE = 71,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE = 72,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_CURL_ALLOCATION_FAILURE = 73,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_NOT_ACCEPTABLE (406).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_FAILED_TO_LOAD_TEMPLATE = 74,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_FAILED_TO_EXPAND_TEMPLATE = 75,
+
+
+ /**
+ * 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.
+ * Returned with an HTTP status code of #MHD_HTTP_NOT_IMPLEMENTED (501).
+ * (A value of 0 indicates that the error is generated client-side).
+ */
+ TALER_EC_GENERIC_FEATURE_NOT_IMPLEMENTED = 76,
+
+
+ /**
* We encountered a timeout with our payment backend.
* Returned with an HTTP status code of #MHD_HTTP_GATEWAY_TIMEOUT (504).
* (A value of 0 indicates that the error is generated client-side).
diff --git a/src/include/taler/taler_signatures.h b/src/include/taler/taler_signatures.h
@@ -407,12 +407,6 @@
/**
- * Signature over messages to delete in the mailbox service
- */
-#define TALER_SIGNATURE_MAILBOX_MESSAGES_DELETE 1223
-
-
-/**
* Signature on a denomination key announcement.
*/
#define TALER_SIGNATURE_SM_RSA_DENOMINATION_KEY 1250
@@ -472,4 +466,16 @@
#define TALER_SIGNATURE_SYNC_BACKUP_UPLOAD 1450
+/**
+ * Signature over messages to delete in the mailbox service
+ */
+#define TALER_SIGNATURE_MAILBOX_MESSAGES_DELETE 1551
+
+
+/**
+ * Signature for mailbox registration request
+ */
+#define TALER_SIGNATURE_MAILBOX_REGISTER 1552
+
+
#endif
diff --git a/src/mhd/mhd_spa.c b/src/mhd/mhd_spa.c
@@ -320,6 +320,7 @@ struct TALER_MHD_Spa *
TALER_MHD_spa_load (const struct GNUNET_OS_ProjectData *pd,
const char *dir)
{
+ struct TALER_MHD_Spa *spa;
char *dn;
char *path;
@@ -335,7 +336,9 @@ TALER_MHD_spa_load (const struct GNUNET_OS_ProjectData *pd,
path,
dir);
GNUNET_free (path);
- return TALER_MHD_spa_load_dir (dn);
+ spa = TALER_MHD_spa_load_dir (dn);
+ GNUNET_free (dn);
+ return spa;
}
diff --git a/src/mhd/mhd_typst.c b/src/mhd/mhd_typst.c
@@ -290,7 +290,7 @@ pdftk_done_cb (void *cls,
"pdftk exited with status %d\n",
(int) exit_code);
typst_context_fail (tc,
- 42, // FIXME: use proper EC!
+ TALER_EC_EXCHANGE_GENERIC_PDFTK_FAILURE,
"pdftk failed");
}
else
@@ -311,7 +311,7 @@ pdftk_done_cb (void *cls,
"pdftk died with signal %d\n",
(int) exit_code);
typst_context_fail (tc,
- 42, // FIXME: use proper EC!
+ TALER_EC_EXCHANGE_GENERIC_PDFTK_CRASH,
"pdftk killed by signal");
break;
}
@@ -404,7 +404,7 @@ typst_done_cb (void *cls,
"Typst exited with status %d",
(int) exit_code);
typst_context_fail (tc,
- 42, // FIXME: use proper EC!
+ TALER_EC_EXCHANGE_GENERIC_TYPST_TEMPLATE_FAILURE,
err);
TALER_MHD_typst_cancel (tc);
return;
@@ -422,7 +422,7 @@ typst_done_cb (void *cls,
"Typst died with signal %d",
(int) exit_code);
typst_context_fail (tc,
- 42, // FIXME: use proper EC!
+ TALER_EC_EXCHANGE_GENERIC_TYPST_CRASH,
err);
TALER_MHD_typst_cancel (tc);
return;
@@ -696,7 +696,7 @@ TALER_MHD_typst (
"Typst setup failed on stage %u",
i);
typst_context_fail (tc,
- 42, // FIXME: use proper EC!
+ TALER_EC_EXCHANGE_GENERIC_TYPST_TEMPLATE_FAILURE,
err);
TALER_MHD_typst_cancel (tc);
return NULL;
diff --git a/src/util/taler_error_codes.c b/src/util/taler_error_codes.c
@@ -71,20 +71,6 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
- .ec = TALER_EC_GENERIC_CLIENT_INTERNAL_ERROR,
- .hint = gettext_noop (
- "An internal failure happened on the client side. Details should be in the local logs. Check if you are using the latest available version or file a report with the developers."),
- .http_code = MHD_HTTP_UNINITIALIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION,
- .hint = gettext_noop (
- "The client does not support the protocol version advertised by the server."),
- .http_code = MHD_HTTP_UNINITIALIZED
- },
-
- {
.ec = TALER_EC_GENERIC_INVALID_RESPONSE,
.hint = gettext_noop (
"The response we got from the server was not in the expected format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server."),
@@ -92,292 +78,6 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
- .ec = TALER_EC_GENERIC_TIMEOUT,
- .hint = gettext_noop (
- "The operation timed out. Trying again might help. Check the network connection."),
- .http_code = MHD_HTTP_UNINITIALIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_VERSION_MALFORMED,
- .hint = gettext_noop (
- "The protocol version given by the server does not follow the required format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server."),
- .http_code = MHD_HTTP_UNINITIALIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_REPLY_MALFORMED,
- .hint = gettext_noop (
- "The service responded with a reply that was in the right data format, but the content did not satisfy the protocol. Please file a bug report."),
- .http_code = MHD_HTTP_UNINITIALIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_CONFIGURATION_INVALID,
- .hint = gettext_noop (
- "There is an error in the client-side configuration, for example an option is set to an invalid value. Check the logs and fix the local configuration."),
- .http_code = MHD_HTTP_UNINITIALIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_UNEXPECTED_REQUEST_ERROR,
- .hint = gettext_noop (
- "The client made a request to a service, but received an error response it does not know how to handle. Please file a bug report."),
- .http_code = MHD_HTTP_UNINITIALIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT,
- .hint = gettext_noop (
- "The token used by the client to authorize the request does not grant the required permissions for the request. Check the requirements and obtain a suitable authorization token to proceed."),
- .http_code = MHD_HTTP_FORBIDDEN
- },
-
- {
- .ec = TALER_EC_GENERIC_METHOD_INVALID,
- .hint = gettext_noop (
- "The HTTP method used is invalid for this endpoint. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_METHOD_NOT_ALLOWED
- },
-
- {
- .ec = TALER_EC_GENERIC_ENDPOINT_UNKNOWN,
- .hint = gettext_noop (
- "There is no endpoint defined for the URL provided by the client. Check if you used the correct URL and/or file a report with the developers of the client software."),
- .http_code = MHD_HTTP_NOT_FOUND
- },
-
- {
- .ec = TALER_EC_GENERIC_JSON_INVALID,
- .hint = gettext_noop (
- "The JSON in the client's request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED,
- .hint = gettext_noop (
- "Some of the HTTP headers provided by the client were malformed and caused the server to not be able to handle the request. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
- .hint = gettext_noop (
- "The payto:// URI provided by the client is malformed. Check that you are using the correct syntax as of RFC 8905 and/or that you entered the bank account number correctly."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_PARAMETER_MISSING,
- .hint = gettext_noop (
- "A required parameter in the request was missing. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_PARAMETER_MALFORMED,
- .hint = gettext_noop (
- "A parameter in the request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_RESERVE_PUB_MALFORMED,
- .hint = gettext_noop ("The reserve public key was malformed."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_COMPRESSION_INVALID,
- .hint = gettext_noop (
- "The body in the request could not be decompressed by the server. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED,
- .hint = gettext_noop (
- "A segment in the path of the URL provided by the client is malformed. Check that you are using the correct encoding for the URL."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_CURRENCY_MISMATCH,
- .hint = gettext_noop (
- "The currency involved in the operation is not acceptable for this server. Check your configuration and make sure the currency specified for a given service provider is one of the currencies supported by that provider."),
- .http_code = MHD_HTTP_BAD_REQUEST
- },
-
- {
- .ec = TALER_EC_GENERIC_URI_TOO_LONG,
- .hint = gettext_noop (
- "The URI is longer than the longest URI the HTTP server is willing to parse. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit."),
- .http_code = MHD_HTTP_URI_TOO_LONG
- },
-
- {
- .ec = TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT,
- .hint = gettext_noop (
- "The body is too large to be permissible for the endpoint. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit."),
- .http_code = MHD_HTTP_CONTENT_TOO_LARGE
- },
-
- {
- .ec = TALER_EC_GENERIC_UNAUTHORIZED,
- .hint = gettext_noop (
- "The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner."),
- .http_code = MHD_HTTP_UNAUTHORIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_TOKEN_UNKNOWN,
- .hint = gettext_noop (
- "The service refused the request as the given authorization token is unknown. You should request a valid access token from the account owner."),
- .http_code = MHD_HTTP_UNAUTHORIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_TOKEN_EXPIRED,
- .hint = gettext_noop (
- "The service refused the request as the given authorization token expired. You should request a fresh authorization token from the account owner."),
- .http_code = MHD_HTTP_UNAUTHORIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_TOKEN_MALFORMED,
- .hint = gettext_noop (
- "The service refused the request as the given authorization token is invalid or malformed. You should check that you have the right credentials."),
- .http_code = MHD_HTTP_UNAUTHORIZED
- },
-
- {
- .ec = TALER_EC_GENERIC_FORBIDDEN,
- .hint = gettext_noop (
- "The service refused the request due to lack of proper rights on the resource. You may need different credentials to be allowed to perform this operation."),
- .http_code = MHD_HTTP_FORBIDDEN
- },
-
- {
- .ec = TALER_EC_GENERIC_DB_SETUP_FAILED,
- .hint = gettext_noop (
- "The service failed initialize its connection to the database. The system administrator should check that the service has permissions to access the database and that the database is running."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_DB_START_FAILED,
- .hint = gettext_noop (
- "The service encountered an error event to just start the database transaction. The system administrator should check that the database is running."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_DB_STORE_FAILED,
- .hint = gettext_noop (
- "The service failed to store information in its database. The system administrator should check that the database is running and review the service logs."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_DB_FETCH_FAILED,
- .hint = gettext_noop (
- "The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_DB_COMMIT_FAILED,
- .hint = gettext_noop (
- "The service encountered an unrecoverable error trying to commit a transaction to the database. The system administrator should check that the database is running and review the service logs."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_DB_SOFT_FAILURE,
- .hint = gettext_noop (
- "The service encountered an error event to commit the database transaction, even after repeatedly retrying it there was always a conflicting transaction. This indicates a repeated serialization error; it should only happen if some client maliciously tries to create conflicting concurrent transactions. It could also be a sign of a missing index. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_DB_INVARIANT_FAILURE,
- .hint = gettext_noop (
- "The service's database is inconsistent and violates service-internal invariants. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE,
- .hint = gettext_noop (
- "The HTTP server experienced an internal invariant failure (bug). Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH,
- .hint = gettext_noop (
- "The service could not compute a cryptographic hash over some JSON value. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_FAILED_COMPUTE_AMOUNT,
- .hint = gettext_noop (
- "The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY,
- .hint = gettext_noop (
- "The HTTP server had insufficient memory to parse the request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_ALLOCATION_FAILURE,
- .hint = gettext_noop (
- "The HTTP server failed to allocate memory. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE,
- .hint = gettext_noop (
- "The HTTP server failed to allocate memory for building JSON reply. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_CURL_ALLOCATION_FAILURE,
- .hint = gettext_noop (
- "The HTTP server failed to allocate memory for making a CURL request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_FAILED_TO_LOAD_TEMPLATE,
- .hint = gettext_noop (
- "The backend could not locate a required template to generate an HTML reply. The system administrator should check if the resource files are installed in the correct location and are readable to the service."),
- .http_code = MHD_HTTP_NOT_ACCEPTABLE
- },
-
- {
- .ec = TALER_EC_GENERIC_FAILED_TO_EXPAND_TEMPLATE,
- .hint = gettext_noop (
- "The backend could not expand the template to generate an HTML reply. The system administrator should investigate the logs and check if the templates are well-formed."),
- .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
- },
-
- {
- .ec = TALER_EC_GENERIC_FEATURE_NOT_IMPLEMENTED,
- .hint = gettext_noop (
- "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."),
- .http_code = MHD_HTTP_NOT_IMPLEMENTED
- },
-
- {
.ec = TALER_EC_EXCHANGE_GENERIC_BAD_CONFIGURATION,
.hint = gettext_noop (
"Exchange is badly configured and thus cannot operate."),
@@ -680,6 +380,41 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_EXCHANGE_GENERIC_TYPST_TEMPLATE_FAILURE,
+ .hint = gettext_noop (
+ "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."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_EXCHANGE_GENERIC_PDFTK_FAILURE,
+ .hint = gettext_noop (
+ "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."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_EXCHANGE_GENERIC_TYPST_CRASH,
+ .hint = gettext_noop (
+ "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."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_EXCHANGE_GENERIC_PDFTK_CRASH,
+ .hint = gettext_noop (
+ "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."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_TIMEOUT,
+ .hint = gettext_noop (
+ "The operation timed out. Trying again might help. Check the network connection."),
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
.ec = TALER_EC_EXCHANGE_DEPOSITS_GET_NOT_FOUND,
.hint = gettext_noop (
"The exchange did not find information about the specified transaction in the database."),
@@ -841,8 +576,15 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
{
.ec = TALER_EC_EXCHANGE_WITHDRAW_IDEMPOTENT_PLANCHET,
.hint = gettext_noop (
- "The batch withdraw included a planchet that was already withdrawn. This is not allowed."),
- .http_code = MHD_HTTP_CONFLICT
+ "The withdraw operation included the same planchet more than once. This is not allowed."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_VERSION_MALFORMED,
+ .hint = gettext_noop (
+ "The protocol version given by the server does not follow the required format. Most likely, the server does not speak the GNU Taler protocol. Check the URL and/or the network connection to the server."),
+ .http_code = MHD_HTTP_UNINITIALIZED
},
{
@@ -929,6 +671,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_REPLY_MALFORMED,
+ .hint = gettext_noop (
+ "The service responded with a reply that was in the right data format, but the content did not satisfy the protocol. Please file a bug report."),
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
.ec = TALER_EC_EXCHANGE_MELT_FEES_EXCEED_CONTRIBUTION,
.hint = gettext_noop (
"The exchange encountered melt fees exceeding the melted coin's contribution."),
@@ -1042,6 +791,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_CONFIGURATION_INVALID,
+ .hint = gettext_noop (
+ "There is an error in the client-side configuration, for example an option is set to an invalid value. Check the logs and fix the local configuration."),
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
.ec = TALER_EC_EXCHANGE_LINK_COIN_UNKNOWN,
.hint = gettext_noop (
"The coin specified in the link request is unknown to the exchange."),
@@ -1092,6 +848,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_UNEXPECTED_REQUEST_ERROR,
+ .hint = gettext_noop (
+ "The client made a request to a service, but received an error response it does not know how to handle. Please file a bug report."),
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
.ec = TALER_EC_EXCHANGE_REFUND_COIN_NOT_FOUND,
.hint = gettext_noop (
"The exchange knows literally nothing about the coin we were asked to refund. But without a transaction history, we cannot issue a refund. This is kind-of OK, the owner should just refresh it directly without executing the refund."),
@@ -1236,6 +999,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_TOKEN_PERMISSION_INSUFFICIENT,
+ .hint = gettext_noop (
+ "The token used by the client to authorize the request does not grant the required permissions for the request. Check the requirements and obtain a suitable authorization token to proceed."),
+ .http_code = MHD_HTTP_FORBIDDEN
+ },
+
+ {
.ec = TALER_EC_EXCHANGE_KEYS_TIMETRAVEL_FORBIDDEN,
.hint = gettext_noop (
"This exchange does not allow clients to request /keys for times other than the current (exchange) time."),
@@ -2051,6 +1821,20 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_CLIENT_INTERNAL_ERROR,
+ .hint = gettext_noop (
+ "An internal failure happened on the client side. Details should be in the local logs. Check if you are using the latest available version or file a report with the developers."),
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_METHOD_INVALID,
+ .hint = gettext_noop (
+ "The HTTP method used is invalid for this endpoint. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_METHOD_NOT_ALLOWED
+ },
+
+ {
.ec = TALER_EC_MERCHANT_GENERIC_INSTANCE_UNKNOWN,
.hint = gettext_noop (
"The backend could not find the merchant instance specified in the request."),
@@ -2085,13 +1869,6 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
- .ec = TALER_EC_MERCHANT_GENERIC_UNIT_BUILTIN,
- .hint = gettext_noop (
- "The unit referenced in the request is builtin and cannot be modified or deleted."),
- .http_code = MHD_HTTP_CONFLICT
- },
-
- {
.ec = TALER_EC_MERCHANT_GENERIC_ORDER_UNKNOWN,
.hint = gettext_noop ("The proposal is not known to the backend."),
.http_code = MHD_HTTP_NOT_FOUND
@@ -2284,6 +2061,20 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_MERCHANT_GENERIC_UNIT_BUILTIN,
+ .hint = gettext_noop (
+ "The unit referenced in the request is builtin and cannot be modified or deleted."),
+ .http_code = MHD_HTTP_CONFLICT
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_ENDPOINT_UNKNOWN,
+ .hint = gettext_noop (
+ "There is no endpoint defined for the URL provided by the client. Check if you used the correct URL and/or file a report with the developers of the client software."),
+ .http_code = MHD_HTTP_NOT_FOUND
+ },
+
+ {
.ec = TALER_EC_MERCHANT_GET_ORDERS_EXCHANGE_TRACKING_FAILURE,
.hint = gettext_noop (
"The exchange failed to provide a valid answer to the tracking request, thus those details are not in the response."),
@@ -2619,6 +2410,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_JSON_INVALID,
+ .hint = gettext_noop (
+ "The JSON in the client's request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_MERCHANT_POST_ORDERS_ID_PAID_CONTRACT_HASH_MISMATCH,
.hint = gettext_noop (
"The contract hash does not match the given order ID."),
@@ -2738,6 +2536,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_HTTP_HEADERS_MALFORMED,
+ .hint = gettext_noop (
+ "Some of the HTTP headers provided by the client were malformed and caused the server to not be able to handle the request. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_MERCHANT_POST_ORDERS_ID_CLAIM_NOT_FOUND,
.hint = gettext_noop (
"We could not claim the order because the backend is unaware of it."),
@@ -2764,6 +2569,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_PAYTO_URI_MALFORMED,
+ .hint = gettext_noop (
+ "The payto:// URI provided by the client is malformed. Check that you are using the correct syntax as of RFC 8905 and/or that you entered the bank account number correctly."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_MERCHANT_REWARD_PICKUP_UNBLIND_FAILURE,
.hint = gettext_noop (
"The client failed to unblind the signature returned by the merchant."),
@@ -2806,6 +2618,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_PARAMETER_MISSING,
+ .hint = gettext_noop (
+ "A required parameter in the request was missing. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec =
TALER_EC_MERCHANT_PRIVATE_POST_ORDERS_INSTANCE_CONFIGURATION_LACKS_WIRE,
.hint = gettext_noop (
@@ -3032,6 +2851,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_PARAMETER_MALFORMED,
+ .hint = gettext_noop (
+ "A parameter in the request was malformed. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_MERCHANT_PRIVATE_POST_INSTANCES_ALREADY_EXISTS,
.hint = gettext_noop (
"The merchant backend cannot create an instance under the given identifier as one already exists. Use PATCH to modify the existing entry."),
@@ -3135,6 +2961,12 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_RESERVE_PUB_MALFORMED,
+ .hint = gettext_noop ("The reserve public key was malformed."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_MERCHANT_PRIVATE_POST_RESERVES_UNSUPPORTED_WIRE_METHOD,
.hint = gettext_noop (
"The requested wire method is not supported by the exchange."),
@@ -3183,6 +3015,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_COMPRESSION_INVALID,
+ .hint = gettext_noop (
+ "The body in the request could not be decompressed by the server. This is likely a bug in the client implementation. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_MERCHANT_PRIVATE_GET_ORDERS_ID_AMOUNT_ARITHMETIC_FAILURE,
.hint = gettext_noop (
"The merchant backend encountered a failure in computing the deposit total."),
@@ -3232,6 +3071,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_PATH_SEGMENT_MALFORMED,
+ .hint = gettext_noop (
+ "A segment in the path of the URL provided by the client is malformed. Check that you are using the correct encoding for the URL."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_MERCHANT_PRIVATE_POST_WEBHOOKS_CONFLICT_WEBHOOK_EXISTS,
.hint = gettext_noop ("The webhook ID elready exists."),
.http_code = MHD_HTTP_CONFLICT
@@ -3245,6 +3091,20 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_CLIENT_UNSUPPORTED_PROTOCOL_VERSION,
+ .hint = gettext_noop (
+ "The client does not support the protocol version advertised by the server."),
+ .http_code = MHD_HTTP_UNINITIALIZED
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_CURRENCY_MISMATCH,
+ .hint = gettext_noop (
+ "The currency involved in the operation is not acceptable for this server. Check your configuration and make sure the currency specified for a given service provider is one of the currencies supported by that provider."),
+ .http_code = MHD_HTTP_BAD_REQUEST
+ },
+
+ {
.ec = TALER_EC_AUDITOR_GENERIC_UNAUTHORIZED,
.hint = gettext_noop (
"The auditor refused the connection due to a lack of authorization."),
@@ -3258,6 +3118,13 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_URI_TOO_LONG,
+ .hint = gettext_noop (
+ "The URI is longer than the longest URI the HTTP server is willing to parse. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit."),
+ .http_code = MHD_HTTP_URI_TOO_LONG
+ },
+
+ {
.ec = TALER_EC_AUDITOR_DEPOSIT_CONFIRMATION_SIGNATURE_INVALID,
.hint = gettext_noop (
"The signature from the exchange on the deposit confirmation is invalid.")
@@ -3285,6 +3152,62 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_UPLOAD_EXCEEDS_LIMIT,
+ .hint = gettext_noop (
+ "The body is too large to be permissible for the endpoint. If you believe this was a legitimate request, contact the server administrators and/or the software developers to increase the limit."),
+ .http_code = MHD_HTTP_CONTENT_TOO_LARGE
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_UNAUTHORIZED,
+ .hint = gettext_noop (
+ "The service refused the request due to lack of proper authorization. Accessing this endpoint requires an access token from the account owner."),
+ .http_code = MHD_HTTP_UNAUTHORIZED
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_TOKEN_UNKNOWN,
+ .hint = gettext_noop (
+ "The service refused the request as the given authorization token is unknown. You should request a valid access token from the account owner."),
+ .http_code = MHD_HTTP_UNAUTHORIZED
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_TOKEN_EXPIRED,
+ .hint = gettext_noop (
+ "The service refused the request as the given authorization token expired. You should request a fresh authorization token from the account owner."),
+ .http_code = MHD_HTTP_UNAUTHORIZED
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_TOKEN_MALFORMED,
+ .hint = gettext_noop (
+ "The service refused the request as the given authorization token is invalid or malformed. You should check that you have the right credentials."),
+ .http_code = MHD_HTTP_UNAUTHORIZED
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_FORBIDDEN,
+ .hint = gettext_noop (
+ "The service refused the request due to lack of proper rights on the resource. You may need different credentials to be allowed to perform this operation."),
+ .http_code = MHD_HTTP_FORBIDDEN
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_DB_SETUP_FAILED,
+ .hint = gettext_noop (
+ "The service failed initialize its connection to the database. The system administrator should check that the service has permissions to access the database and that the database is running."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_DB_START_FAILED,
+ .hint = gettext_noop (
+ "The service encountered an error event to just start the database transaction. The system administrator should check that the database is running."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
.ec = TALER_EC_BANK_SAME_ACCOUNT,
.hint = gettext_noop (
"Wire transfer attempted with credit and debit party being the same bank account."),
@@ -3670,6 +3593,55 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_DB_STORE_FAILED,
+ .hint = gettext_noop (
+ "The service failed to store information in its database. The system administrator should check that the database is running and review the service logs."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_DB_FETCH_FAILED,
+ .hint = gettext_noop (
+ "The service failed to fetch information from its database. The system administrator should check that the database is running and review the service logs."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_DB_COMMIT_FAILED,
+ .hint = gettext_noop (
+ "The service encountered an unrecoverable error trying to commit a transaction to the database. The system administrator should check that the database is running and review the service logs."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_DB_SOFT_FAILURE,
+ .hint = gettext_noop (
+ "The service encountered an error event to commit the database transaction, even after repeatedly retrying it there was always a conflicting transaction. This indicates a repeated serialization error; it should only happen if some client maliciously tries to create conflicting concurrent transactions. It could also be a sign of a missing index. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_DB_INVARIANT_FAILURE,
+ .hint = gettext_noop (
+ "The service's database is inconsistent and violates service-internal invariants. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE,
+ .hint = gettext_noop (
+ "The HTTP server experienced an internal invariant failure (bug). Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_FAILED_COMPUTE_JSON_HASH,
+ .hint = gettext_noop (
+ "The service could not compute a cryptographic hash over some JSON value. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
.ec = TALER_EC_SYNC_ACCOUNT_UNKNOWN,
.hint = gettext_noop (
"The sync service failed find the account in its database."),
@@ -3774,6 +3746,20 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_FAILED_COMPUTE_AMOUNT,
+ .hint = gettext_noop (
+ "The service could not compute an amount. Check if you are using the latest available version and/or file a report with the developers."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_PARSER_OUT_OF_MEMORY,
+ .hint = gettext_noop (
+ "The HTTP server had insufficient memory to parse the request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
.ec = TALER_EC_WALLET_EXCHANGE_PROTOCOL_VERSION_INCOMPATIBLE,
.hint = gettext_noop (
"The wallet does not implement a version of the exchange protocol that is compatible with the protocol version of the exchange."),
@@ -3843,13 +3829,6 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
- .ec = TALER_EC_WALLET_EXCHANGE_WITHDRAW_RESERVE_UNKNOWN_AT_EXCHANGE,
- .hint = gettext_noop (
- "The exchange does not know about the reserve (yet), and thus withdrawal can't progress."),
- .http_code = MHD_HTTP_NOT_FOUND
- },
-
- {
.ec = TALER_EC_WALLET_CORE_NOT_AVAILABLE,
.hint = gettext_noop ("The wallet core service is not available."),
.http_code = MHD_HTTP_UNINITIALIZED
@@ -4112,6 +4091,48 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
},
{
+ .ec = TALER_EC_GENERIC_ALLOCATION_FAILURE,
+ .hint = gettext_noop (
+ "The HTTP server failed to allocate memory. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_JSON_ALLOCATION_FAILURE,
+ .hint = gettext_noop (
+ "The HTTP server failed to allocate memory for building JSON reply. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_CURL_ALLOCATION_FAILURE,
+ .hint = gettext_noop (
+ "The HTTP server failed to allocate memory for making a CURL request. Restarting services periodically can help, especially if Postgres is using excessive amounts of memory. Check with the system administrator to investigate."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_FAILED_TO_LOAD_TEMPLATE,
+ .hint = gettext_noop (
+ "The backend could not locate a required template to generate an HTML reply. The system administrator should check if the resource files are installed in the correct location and are readable to the service."),
+ .http_code = MHD_HTTP_NOT_ACCEPTABLE
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_FAILED_TO_EXPAND_TEMPLATE,
+ .hint = gettext_noop (
+ "The backend could not expand the template to generate an HTML reply. The system administrator should investigate the logs and check if the templates are well-formed."),
+ .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR
+ },
+
+ {
+ .ec = TALER_EC_GENERIC_FEATURE_NOT_IMPLEMENTED,
+ .hint = gettext_noop (
+ "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."),
+ .http_code = MHD_HTTP_NOT_IMPLEMENTED
+ },
+
+ {
.ec = TALER_EC_ANASTASIS_GENERIC_BACKEND_TIMEOUT,
.hint = gettext_noop ("We encountered a timeout with our payment backend."),
.http_code = MHD_HTTP_GATEWAY_TIMEOUT
@@ -4768,7 +4789,7 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = {
/**
* The length of @e code_hint_pairs.
*/
-static const unsigned int code_hint_pairs_length = 681;
+static const unsigned int code_hint_pairs_length = 685;
const char *