fixture-verified rule
Route failures use AppError
96
Throw AppError with a stable code for expected API failures; do not throw a generic Error.
Evidence chain2 sources
src/errors/AppError.tscommit 4e62a10refactor(api): make error codes observable
A historical migration replaced generic route errors.
src/api/projects/projects.test.tserror contractexpect(error).toBeInstanceOf(AppError)
The contract is enforced by tests.
source guidance holdout promoted