Skip to content

Add not found middleware#234

Open
Fred0104 wants to merge 1 commit into
TevaLabs:mainfrom
Fred0104:add-not-found-middleware
Open

Add not found middleware#234
Fred0104 wants to merge 1 commit into
TevaLabs:mainfrom
Fred0104:add-not-found-middleware

Conversation

@Fred0104

Copy link
Copy Markdown

Summary

  • add a dedicated notFound middleware for unmatched routes
  • register terminal middleware in the documented order: notFound before errorHandler
  • enable and update the 404 JSON response test
  • fix the test JWT fallback so startup preflight accepts test imports
  • update the deprecated TypeScript setting from 6.0 to 5.0, which is accepted by the current TypeScript release

Closes #214.

Validation

  • npm test -- errorHandler.spec.ts --runInBand
  • Docker clean check (node:22-bookworm): npm ci --ignore-scripts --no-audit --no-fund && npx prisma generate && npm test -- errorHandler.spec.ts --runInBand

Note: npm run build / npm run lint still fail on existing unrelated type errors in leaderboard, scheduler, retention/audit, and retry tests. This PR keeps the change scoped to the 404/error middleware issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Hackathon] Add global error handler and 404 middleware

1 participant