fix(kattis): harden reactive re-auth trigger on submit
Problem: stale cookie detection only matched the exact text `"Request validation failed"`, missing cases where Kattis returns a 400 or 403 status instead. Solution: also trigger re-login when `r.status_code in (400, 403)`.
This commit is contained in:
parent
397576ad93
commit
923dc7293f
1 changed files with 1 additions and 1 deletions
|
|
@ -366,7 +366,7 @@ class KattisScraper(BaseScraper):
|
|||
except Exception as e:
|
||||
return self._submit_error(f"Submit request failed: {e}")
|
||||
|
||||
if r.text == "Request validation failed":
|
||||
if r.status_code in (400, 403) or r.text == "Request validation failed":
|
||||
_COOKIE_PATH.unlink(missing_ok=True)
|
||||
print(json.dumps({"status": "logging_in"}), flush=True)
|
||||
ok = await _do_kattis_login(client, username, password)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue