Skip to content

feat(error-handling): add global 404 JSON response filter#56

Merged
Uyoxy merged 2 commits intostellarspend:mainfrom
lynaDev2:feature/global-404-handler
Mar 5, 2026
Merged

feat(error-handling): add global 404 JSON response filter#56
Uyoxy merged 2 commits intostellarspend:mainfrom
lynaDev2:feature/global-404-handler

Conversation

@lynaDev2
Copy link
Copy Markdown
Contributor

@lynaDev2 lynaDev2 commented Mar 5, 2026

Summary

Adds a global NestJS NotFound filter to return a consistent JSON response for unmatched routes.

Changes

Implemented NotFoundFilter

Registered filter in main.ts

Returns { statusCode: 404, message: "Route not found" }

Added test to verify behavior

Acceptance Criteria

Unknown routes return 404 with correct JSON structure

Existing routes continue to function normally

Tests pass successfully

How To Test

Start backend

Send GET /some/nonexistent/route

Expect 404 with { statusCode: 404, message: "Route not found" }

@Uyoxy Uyoxy merged commit 7a02bfb into stellarspend:main Mar 5, 2026
1 check failed
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.

2 participants