exchange

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

commit 08682d8b99c1df217d07480e3e4e3c92096807be
parent ac4047e7fe60029d3cb1e395a056560519f30f91
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  2 May 2026 23:17:56 +0200

update GANA

Diffstat:
Msrc/include/taler/taler_error_codes.h | 18+++++++++++++-----
Msrc/util/taler_error_codes.c | 20++++++++++++++------
2 files changed, 27 insertions(+), 11 deletions(-)

diff --git a/src/include/taler/taler_error_codes.h b/src/include/taler/taler_error_codes.h @@ -5762,7 +5762,7 @@ enum TALER_ErrorCode /** * The client is not authorized to use the given redirect URI. - * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403). + * 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_CHALLENGER_GENERIC_CLIENT_FORBIDDEN_BAD_REDIRECT_URI = 9751, @@ -5770,7 +5770,7 @@ enum TALER_ErrorCode /** * The service failed to execute its helper process to send the challenge. - * Returned with an HTTP status code of #MHD_HTTP_INTERNAL_SERVER_ERROR (500). + * Returned with an HTTP status code of #MHD_HTTP_BAD_GATEWAY (502). * (A value of 0 indicates that the error is generated client-side). */ TALER_EC_CHALLENGER_HELPER_EXEC_FAILED = 9752, @@ -5778,7 +5778,7 @@ enum TALER_ErrorCode /** * The grant is unknown to the service (it could also have expired). - * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). + * 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_CHALLENGER_GRANT_UNKNOWN = 9753, @@ -5786,7 +5786,7 @@ enum TALER_ErrorCode /** * The code given is not even well-formed. - * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403). + * 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_CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE = 9754, @@ -5794,7 +5794,7 @@ enum TALER_ErrorCode /** * The service is not aware of the referenced validation process. - * Returned with an HTTP status code of #MHD_HTTP_NOT_FOUND (404). + * 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_CHALLENGER_GENERIC_VALIDATION_UNKNOWN = 9755, @@ -5897,6 +5897,14 @@ enum TALER_ErrorCode /** + * The payment template specified in the request is unknown to the backend. + * 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_PAIVANA_TEMPLATE_UNKNOWN = 9807, + + + /** * End of error code range. * Returned with an HTTP status code of #MHD_HTTP_UNINITIALIZED (0). * (A value of 0 indicates that the error is generated client-side). diff --git a/src/util/taler_error_codes.c b/src/util/taler_error_codes.c @@ -5519,7 +5519,7 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { /* 9751 */ .ec = TALER_EC_CHALLENGER_GENERIC_CLIENT_FORBIDDEN_BAD_REDIRECT_URI, .hint = "The client is not authorized to use the given redirect URI.", - .http_code = MHD_HTTP_FORBIDDEN + .http_code = MHD_HTTP_UNAUTHORIZED }, { @@ -5527,28 +5527,28 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { .ec = TALER_EC_CHALLENGER_HELPER_EXEC_FAILED, .hint = "The service failed to execute its helper process to send the challenge.", - .http_code = MHD_HTTP_INTERNAL_SERVER_ERROR + .http_code = MHD_HTTP_BAD_GATEWAY }, { /* 9753 */ .ec = TALER_EC_CHALLENGER_GRANT_UNKNOWN, .hint = "The grant is unknown to the service (it could also have expired).", - .http_code = MHD_HTTP_NOT_FOUND + .http_code = MHD_HTTP_UNAUTHORIZED }, { /* 9754 */ .ec = TALER_EC_CHALLENGER_CLIENT_FORBIDDEN_BAD_CODE, .hint = "The code given is not even well-formed.", - .http_code = MHD_HTTP_FORBIDDEN + .http_code = MHD_HTTP_UNAUTHORIZED }, { /* 9755 */ .ec = TALER_EC_CHALLENGER_GENERIC_VALIDATION_UNKNOWN, .hint = "The service is not aware of the referenced validation process.", - .http_code = MHD_HTTP_NOT_FOUND + .http_code = MHD_HTTP_UNAUTHORIZED }, { @@ -5645,6 +5645,14 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { }, { + /* 9807 */ + .ec = TALER_EC_PAIVANA_TEMPLATE_UNKNOWN, + .hint = + "The payment template specified in the request is unknown to the backend.", + .http_code = MHD_HTTP_NOT_FOUND + }, + + { /* 9999 */ .ec = TALER_EC_END, .hint = "End of error code range.", @@ -5658,7 +5666,7 @@ static const struct ErrorCodeAndHint code_hint_pairs[] = { /** * The length of @e code_hint_pairs. */ -static const unsigned int code_hint_pairs_length = 731; +static const unsigned int code_hint_pairs_length = 732; const char *