fix(http): return 401 (not 500) on expired/rejected session

Authenticate/RequireCSRF write a 401 then raise ESessionRejected; when it
reached the dispatcher catch-all, the generic `on E: Exception` overwrote it
with a 500. Added `on ESessionRejected do Exit` before the generic clause in
both dispatchers (GET + Other) — one place, covers every handler whether or
not it wraps Authenticate. Root cause, not per-handler patch.

ponytail: runtime check only (expired token → 401) — no Delphi unit harness.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
r-zakarya
2026-07-09 21:42:08 +01:00
parent a980af1e94
commit b023eab1f4
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -200,7 +200,7 @@ entries), problématique au-delà.
**Recommandation** : batcher les déchiffrements (Promise.all par lots),
et si besoin paginer côté serveur pour la vue grille.
### 2.5 🟡 500 au lieu de 401 sur session expirée
### 2.5 500 au lieu de 401 sur session expirée — corrigé (2026-07-09)
`Authenticate` écrit 401 puis `raise ESessionRejected` → le `try/except`
global de `PM.HTTPServer` réécrit un **500**. Pré-existant, tous les