From 956a3954b8bf0aab7731e0c41663c6ccd2019818 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Tue, 11 Jul 2023 13:53:46 -0300 Subject: Handle other error messages on link/unlink --- game/soul.rpy | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/game/soul.rpy b/game/soul.rpy index ccfecea..b2be1bf 100644 --- a/game/soul.rpy +++ b/game/soul.rpy @@ -261,6 +261,9 @@ screen accountdata(): textbutton _("Link Account"): background Frame("gui/frame.png", 0, 0) xysize (200, 40) + ## Maybe disable the button if it is the home world? + ## That would be a soft-fix, as API may or may not + ## accept such change. Similar to how M+ deals with col action Return(["link", srv]) tooltip _("Links an external account to Vault") textbutton _("Unlink"): @@ -464,9 +467,14 @@ label managevault: elif sCode == 403: call screen soulmsg(_("You are not authorized to perform this operation. Please try again later, in three minutes.")) elif sCode == 404: - call screen soulmsg(_("To prevent cheating, you cannot link nor unlink your home world. Please contact staff.")) + call screen soulmsg(_("To prevent cheating, you cannot link nor unlink your home world. Otherwise, it is possible that the account you asked to link does not exist. Please contact staff.")) + elif sCode == 410: + call screen soulmsg(_("The account you tried to link is gone, or an unknown error happened. Please try again later, and if this error persists, contact staff.")) elif sCode == 429: call screen soulmsg(_("You are being rate-limited, and the change was not possible. Please wait a minute before trying again.")) + elif sCode == 502: + #call screen soulmsg(_("The server you tried to link does not support linking, or a gateway error happened (502). Please contact staff.")) + pass else: call screen soulmsg(_("An internal error happened, please report (code: %d)" % sCode)) $ del sCode @@ -511,8 +519,13 @@ label managevault: call screen soulmsg(_("You are not authorized to perform this operation. Please try again later, in three minutes.")) elif sCode == 404: call screen soulmsg(_("To prevent cheating, you cannot link nor unlink your home world. Please contact staff.")) + elif sCode == 410: + call screen soulmsg(_("The account you tried to unlink is gone, or an unknown error happened. Please try again later, and if this error persists, contact staff.")) elif sCode == 429: call screen soulmsg(_("You are being rate-limited, and the change was not possible. Please wait a minute before trying again.")) + elif sCode == 502: + #call screen soulmsg(_("The server you tried to unlink does not support unlinking, or a gateway error happened (502). Please contact staff.")) + pass else: call screen soulmsg(_("An internal error happened, please report (code: %d)" % sCode)) $ del sCode -- cgit v1.2.3-60-g2f50