From 7ea413c57541c477fa13e695609610a48a264eb0 Mon Sep 17 00:00:00 2001 From: Jesusaves Date: Fri, 12 May 2023 09:15:21 -0300 Subject: Report errors 401 and 403 as authentication errors, for those unaware --- game/update.rpy | 10 ++++++++-- 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 -- cgit v1.2.3-60-g2f50