Files
hermes-agent/hermes_cli
kshitijk4poor 4cc4072747 fix(dashboard): map replaced/deleted-WAL store errors to 503 on GET /api/sessions too
GET /api/sessions and _resolve_session_id caught only sqlite3.DatabaseError,
so StateDbReplacedError / DeletedWalGenerationError (RuntimeError family)
fell through to the bare `except Exception` -> 500 "Internal server error" —
the same mis-mapping #110054 fixed for the analytics reads. Route that
exception family through the existing corrupt_store_as_status so the sessions
list and detail routes return the same structured 503 payload; the sqlite
arms (busy -> 503, malformed -> latch + 503) are untouched, which is why the
mapping is added as a sibling arm instead of wrapping the read (that would
skip note_storage_error for a malformed image).

The kept invariant test now also exercises both sessions.py paths; it fails
without this change (raw DeletedWalGenerationError escapes the resolver,
the route returns 500).
2026-09-24 16:47:38 +05:30
..
2026-09-24 03:08:47 -07:00
…
…
…
…
…
…
…
…
…