diff options
author | Jesusaves <cpntb1@ymail.com> | 2023-05-12 09:15:21 -0300 |
---|---|---|
committer | Jesusaves <cpntb1@ymail.com> | 2023-05-12 09:15:21 -0300 |
commit | 7ea413c57541c477fa13e695609610a48a264eb0 (patch) | |
tree | b248f3ed70669da4a8f3718ce1ffa832b1334bde | |
parent | 972344a32ba39e8f2733b5937935145a4611a27d (diff) | |
download | renpy-7ea413c57541c477fa13e695609610a48a264eb0.tar.gz renpy-7ea413c57541c477fa13e695609610a48a264eb0.tar.bz2 renpy-7ea413c57541c477fa13e695609610a48a264eb0.tar.xz renpy-7ea413c57541c477fa13e695609610a48a264eb0.zip |
Report errors 401 and 403 as authentication errors, for those unaware
-rw-r--r-- | game/update.rpy | 10 | ||||
-rw-r--r-- | game/vault.rpy | 3 |
2 files changed, 11 insertions, 2 deletions
diff --git a/game/update.rpy b/game/update.rpy index dce899c..35992f8 100644 --- a/game/update.rpy +++ b/game/update.rpy @@ -405,7 +405,10 @@ label register: del password, data # Python end if (r.status_code != 200): - call screen notice(_("Vault returned error %d\n\nAutomatic login failed." % r.status_code)) + if (r.status_code not in [401, 403]): + call screen notice(_("Vault returned error %d\n\nAutomatic login failed." % r.status_code)) + else: + call screen notice(_("Vault returned error %d (incorrect login/password)\n\nAutomatic login failed." % r.status_code)) else: $ stdout("Vault result: (%d) %s" % (r.status_code, ifte(config.developer, r.text, "OK"))) $ auth2 = r.json() @@ -503,7 +506,10 @@ label register: # Wait for Vault to confirm. if (r.status_code != 200): - call screen notice(_("Vault returned error %d\n\nPlease try again later." % r.status_code)) + if (r.status_code not in [401, 403]): + call screen notice(_("Vault returned error %d\n\nPlease try again later." % r.status_code)) + else: + call screen notice(_("Vault returned error %d (incorrect login/password)\n\nPlease try again later." % r.status_code)) return # Check if we have success diff --git a/game/vault.rpy b/game/vault.rpy index f3ddc38..de0d468 100644 --- a/game/vault.rpy +++ b/game/vault.rpy @@ -220,7 +220,10 @@ label register_vault: # Wait for Vault to confirm. if (r.status_code != 200): + if (r.status_code not in [401, 403]): call screen notice(_("Vault returned error %d\n\nPlease try again later." % r.status_code)) + else: + call screen notice(_("Vault returned error %d (incorrect login/password)\n\nPlease try again later." % r.status_code)) return # Check if we have success |