Flagged during the tests/integration Newman remediation (PR #2145). Same class as the TmloController bug fixed there.
Bug: GET /api/archival/destruction-lists/{bogus-id} returns HTTP 500 with an HTML error page (and, like the TMLO case, risks leaking the raw DBAL SQL) when the id/register/schema doesn't exist — because RegisterMapper::find/lookup throws DoesNotExistException which is swallowed by a generic catch and surfaced as a 500 rather than a clean JSON 404.
Fix direction: in ArchivalController::getDestructionList (and audit sibling methods for the same pattern), catch DoesNotExistException explicitly and return a clean 404 JSON body — mirroring the fix applied to TmloController::summary/exportSingle/exportBatch in #2145. Add a Newman/unit guard asserting 404 (not 500) for an unknown id.
Also noted (lower priority): emails/search and integrations/email/accounts are 501 stubs — expected/known, listed here for visibility.
Flagged during the tests/integration Newman remediation (PR #2145). Same class as the
TmloControllerbug fixed there.Bug:
GET /api/archival/destruction-lists/{bogus-id}returns HTTP 500 with an HTML error page (and, like the TMLO case, risks leaking the raw DBAL SQL) when the id/register/schema doesn't exist — becauseRegisterMapper::find/lookup throwsDoesNotExistExceptionwhich is swallowed by a generic catch and surfaced as a 500 rather than a clean JSON 404.Fix direction: in
ArchivalController::getDestructionList(and audit sibling methods for the same pattern), catchDoesNotExistExceptionexplicitly and return a clean404JSON body — mirroring the fix applied toTmloController::summary/exportSingle/exportBatchin #2145. Add a Newman/unit guard asserting 404 (not 500) for an unknown id.Also noted (lower priority):
emails/searchandintegrations/email/accountsare 501 stubs — expected/known, listed here for visibility.