## Problem CSES `_web_login` used bare dict indexing on the API response, raising an opaque `KeyError` on missing fields. `_check_token` swallowed all exceptions as `False`, conflating transient network errors with invalid tokens. CF persisted cookies unconditionally and silently swallowed `_solve_turnstile` failures in `submit_action`. ## Solution CSES API fields now use `.get()` with a descriptive `RuntimeError` on absence. `_check_token` re-raises `httpx` network/timeout exceptions so callers see real failures. CF cookie writes are guarded by an `X-User-Handle` check (the CF auth cookie). `_solve_turnstile` errors propagate to the outer error handler instead of being silenced. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| atcoder.py | ||
| base.py | ||
| codechef.py | ||
| codeforces.py | ||
| cses.py | ||
| kattis.py | ||
| language_ids.py | ||
| models.py | ||
| timeouts.py | ||
| usaco.py | ||