diff options
-rw-r--r-- | packages/taler-util/src/http-client/bank-core.ts | 2 | ||||
-rw-r--r-- | packages/taler-util/src/taler-error-codes.ts | 80 |
2 files changed, 81 insertions, 1 deletions
diff --git a/packages/taler-util/src/http-client/bank-core.ts b/packages/taler-util/src/http-client/bank-core.ts index 273fb97c6..9d1a18e04 100644 --- a/packages/taler-util/src/http-client/bank-core.ts +++ b/packages/taler-util/src/http-client/bank-core.ts @@ -508,7 +508,7 @@ export class TalerCoreBankHttpClient { case TalerErrorCode.BANK_CONFIRM_INCOMPLETE: return opKnownFailure("no-cashout-payto", resp); case TalerErrorCode.BANK_UNALLOWED_DEBIT: return opKnownFailure("no-enough-balance", resp); case TalerErrorCode.BANK_BAD_CONVERSION: return opKnownFailure("incorrect-exchange-rate", resp); - // case TalerErrorCode.BANK_TAN_CHALLENGE_FAILED: return opKnownFailure("no-enough-balance", resp); + case TalerErrorCode.BANK_TAN_CHALLENGE_FAILED: return opKnownFailure("invalid-code", resp); default: return opUnknownFailure(resp, body) } } diff --git a/packages/taler-util/src/taler-error-codes.ts b/packages/taler-util/src/taler-error-codes.ts index 979fb332e..694adff8f 100644 --- a/packages/taler-util/src/taler-error-codes.ts +++ b/packages/taler-util/src/taler-error-codes.ts @@ -665,6 +665,14 @@ export enum TalerErrorCode { /** + * The exchange failed to start a KYC attribute conversion helper process. It is likely configured incorrectly. + * 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). + */ + EXCHANGE_GENERIC_KYC_CONVERTER_FAILED = 1037, + + + /** * 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). @@ -3393,6 +3401,78 @@ export enum TalerErrorCode { /** + * The request rate is too high. The server is refusing requests to guard against brute-force attacks. + * Returned with an HTTP status code of #MHD_HTTP_TOO_MANY_REQUESTS (429). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_TAN_RATE_LIMITED = 5131, + + + /** + * This TAN channel is not supported. + * Returned with an HTTP status code of #MHD_HTTP_NOT_IMPLEMENTED (501). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_TAN_CHANNEL_NOT_SUPPORTED = 5132, + + + /** + * Failed to send TAN using the helper script. Either script is not found, or script timeout, or script terminated with a non-successful result. + * 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). + */ + BANK_TAN_CHANNEL_SCRIPT_FAILED = 5133, + + + /** + * The client's response to the challenge was invalid. + * Returned with an HTTP status code of #MHD_HTTP_FORBIDDEN (403). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_TAN_CHALLENGE_FAILED = 5134, + + + /** + * A non-admin user has tried to change their legal name. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_NON_ADMIN_PATCH_LEGAL_NAME = 5135, + + + /** + * A non-admin user has tried to change their debt limit. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_NON_ADMIN_PATCH_DEBT_LIMIT = 5136, + + + /** + * A non-admin user has tried to change their password whihout providing the current one. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_NON_ADMIN_PATCH_MISSING_OLD_PASSWORD = 5137, + + + /** + * Provided old password does not match current password. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_PATCH_BAD_OLD_PASSWORD = 5138, + + + /** + * An admin user has tried to become an exchange. + * Returned with an HTTP status code of #MHD_HTTP_CONFLICT (409). + * (A value of 0 indicates that the error is generated client-side). + */ + BANK_PATCH_ADMIN_EXCHANGE = 5139, + + + /** * 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). |