Commit Graph
1 Commits
Author SHA1 Message Date
Lauri Ojansivu baaeea27e3 REST API: a handler's Meteor "not-found" error is a 404, not a 500.
httpStatusForError knew only 'NotFound', while about two hundred throw sites
in server/ spell it Meteor's way - 'not-found', 'board-not-found',
'list-not-found', 'user-not-found' and the rest. So DELETE of a missing
swimlane, and a board-member add naming nobody, answered 500 "Internal
server error" on a real server, while tests/restWriteRoutes404.test.cjs,
which stubs the helper, saw the 404 - found by
tests/playwright/specs/rest-write-routes-404.e2e.js while testing RaceBleed.

Any error name that is or ends in "not-found" is now a 404 with its message;
everything unknown is still a 500 that carries no detail.
tests/restNotFoundStatus.test.cjs runs the real helper, and fails on any
not-found spelling in server/ that it would not map.

Thanks to xet7 !
2026-11-18 03:47:53 +02:00