BillTracker/tests
null 7390c458ed refactor(routes): categories → uniform Express-5 throw pattern (Pillar B template)
Establishes the canonical route error pattern (see docs/CODE_STANDARDS.md):
handlers `throw ValidationError/NotFoundError/ConflictError(...)` and let
Express 5 forward to the single terminal handler — no per-handler
try/catch swallows, no ad-hoc `res.status().json({error})`. Only the
UNIQUE-constraint → 409 mapping keeps a tight try/catch (`asConflict`).

- apiError factories NotFoundError/ConflictError now take an optional
  `field` (parity with ValidationError) so form-field info is preserved.
- routes/categories.cts fully converted; identical status/messages, now
  uniform `{ error, message, code, field }` bodies.
- Test harnesses (categoryGroups, categoryReorder) updated to simulate the
  terminal handler (thrown ApiError → formatted response).

Verified: 236/236 server tests; e2e probe 17/17; live smoke confirms
400 VALIDATION_ERROR / 404 NOT_FOUND with correct field + status.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-06 14:46:32 -05:00
..
amountSuggestionService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
analyticsService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
authService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
backupAndCleanup.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
bankSyncService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
billMerchantRuleService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
billReorder.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
billsDeletedRoute.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
billsService.test.js refactor(server): migrate billsService + notificationService to TypeScript (.cts) 2026-07-06 11:12:06 -05:00
calendarFeedService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
categoryGroups.test.js refactor(routes): categories → uniform Express-5 throw pattern (Pillar B template) 2026-07-06 14:46:32 -05:00
categoryReorder.test.js refactor(routes): categories → uniform Express-5 throw pattern (Pillar B template) 2026-07-06 14:46:32 -05:00
csvTransactionImportService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
encryptionService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
eraseUserData.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
exportImportRoundTrip.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
exportRicher.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
migrationModules.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
money.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
notificationDelivery.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
notificationLeadTime.test.js refactor(server): migrate billsService + notificationService to TypeScript (.cts) 2026-07-06 11:12:06 -05:00
ofxImportService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
paymentAccountingService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
paymentValidation.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
paymentsQuickRoute.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
paymentsRoute.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
profileRoute.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
reconciliation.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
safeToSpend.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
securityCoverage.test.js feat(security): CI secret-scan + dep-audit, SECURITY.md, auth-coverage test (Pillar C) 2026-07-06 14:40:17 -05:00
seedDemoData.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
snowballMath.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
snowballPlanRoute.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
spendingService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
spendingSummary.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
statusService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
subscriptionService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
summaryBankTracking.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
summarySkipOverride.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
totpService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
trackerService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
transactionMatchService.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
transactionMatchState.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00
updateCheckOptOut.test.js style: apply Prettier across client + server (no behavior change) 2026-07-06 14:23:53 -05:00