mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-06-25 16:19:19 +02:00
fix: validation error messages hidden by generic fallback in ErrorHandler::userMessage
ErrorHandler::userMessage only handled RuntimeException, but all validation throws in ThesisCreateController and ThesisEditController use plain Exception. This caused user-friendly messages like 'Le champ Nom/Prénom/Pseudo est requis' to fall through to the 'Une erreur inattendue est survenue…' generic message. Fix: add Exception check (after PDOException, since PDOException extends it) so all validation exceptions pass their message through.
This commit is contained in:
2
TODO.md
2
TODO.md
@@ -41,6 +41,8 @@
|
||||
- [x] **Migration idempotency** — `CREATE INDEX` / `CREATE TRIGGER` / `CREATE VIEW` now use `IF NOT EXISTS` in schema.sql and generate-schema.py; migrate.sh no longer fails on re-run
|
||||
- [ ] **Database readonly** — intermittent permission issue after deploy (added deploy-nginx recipe; permissions should be fixed by --chown + deploy-server.sh)
|
||||
- [x] **Upload progress bar not visible** — `collectFileNames()` now also checks FilePond instances directly (not just `input.files`); `upload-progress.php` no longer requires admin auth (blocked partage form polling)
|
||||
- [x] **Validation error messages hidden by generic fallback** — `ErrorHandler::userMessage` doesn't handle plain `Exception`, so all `throw new Exception(...)` validation messages fall through to "Une erreur inattendue…". Fix: add `Exception` pass-through before the generic fallback.
|
||||
- [x] **Validation messages use wrong field names** — "Nom/Prénom/Pseudo" → "Auteur·ice(s)", "Titre du mémoire" → "Titre du TFE" to match form labels. Updated autofocusFieldForError in both controllers.
|
||||
|
||||
## PeerTube Alternate Labels & FilePond Pools
|
||||
|
||||
|
||||
Reference in New Issue
Block a user