diff --git a/core/models/Result.py b/core/models/Result.py index efb5cdd..37f3c8e 100644 --- a/core/models/Result.py +++ b/core/models/Result.py @@ -39,6 +39,7 @@ class ResultError(Enum): TICKET_SETUP = "ticket_setup" TICKET_EXPIRED = "ticket_expired" ALREADY_EXISTS = "already_exists" + ALREADY_USED = "already_used" BILLING_CODE_EXISTS = "billing_code_exists" PROCESS_GOT_KILLED = "process_got_killed" PROCESS_WONT_START = "process_wont_start" diff --git a/core/models/manage/server_reply_tools.py b/core/models/manage/server_reply_tools.py index c0ac048..1b2b7b6 100644 --- a/core/models/manage/server_reply_tools.py +++ b/core/models/manage/server_reply_tools.py @@ -22,7 +22,8 @@ TRANSLATION_DICT = { ServerError.MISSING_DATA: ResultError.INVALID_INPUT, ServerError.UNPAID: ResultError.SUBSCRIPTION, ServerError.SERVER_SIDE: ResultError.SERVER_SIDE, - ServerError.EXPIRED: ResultError.EXPIRED_INVOICE + ServerError.EXPIRED: ResultError.EXPIRED_INVOICE, + ServerError.ALREADY_USED: ResultError.ALREADY_EXISTS } def format_server_response(api_response: ApiResponse|dict, desired_type: str) -> Result: