You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(errors): report a definitive 404 as not_found, not server_unreachable
RomM answers a request for an entity it no longer has with HTTP 404. Every
exception-type-blind service site collapsed that onto server_unreachable, so
the UI claimed "RomM offline" while the server was plainly answering.
Route those sites through classify_error, which already maps
RommNotFoundError to NOT_FOUND. Sites whose verdict is a partial-success
flag rather than a reason slug peel the 404 off with a sibling
except RommNotFoundError instead:
- get_version_list returns the local-only list with server_query_failed
False on a 404, so the picker stops feeding the global connection store.
- get_save_status keeps server_query_failed True (the flag is what stops
the matrix classifying local files as ready-to-upload against an empty
server list) and gains the additive server_query_reason slug, so only an
explicit server_unreachable drives the offline state.
- list_file_versions and rollback_to_version gain a not_found arm,
distinct from server_unreachable (retryable) and version_deleted (one
save missing from a ROM the server still has).
classify_error gains a narrow ConnectionError/TimeoutError/socket.gaierror
branch so a raw socket failure keeps the unreachable slug. Deliberately not
bare OSError: that also covers local disk I/O, and reporting a failed
settings write as "server unreachable" is the same lie pointing the other
way.
Messages that asserted reachability are replaced ("RomM server not
reachable.", "Cannot inspect slot - server unreachable"); messages already
true for both branches are kept, since only the routing slug was wrong.
scripts/check_404_not_unreachable.py locks this in: a catch-all handler in
services/ may not bind a verdict key (reason/status/recommended_action) to a
hardcoded SERVER_UNREACHABLE. The rule is positional rather than "does the
handler call classify_error", so it also catches a handler that consults the
funnel and then discards its verdict. It finds 14 sites against the previous
tree. steamgrid.py is exempt with a recorded reason: it talks to
SteamGridDB, whose failures classify_error has no branch for.
0 commit comments