Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(routes): Handle Unmatched Routes with router.use for Proper 404 Responses #10

Merged
merged 1 commit into from
Jan 7, 2025

Conversation

TKanX
Copy link
Member

@TKanX TKanX commented Jan 7, 2025

Summary:

Fixed the issue where unmatched routes were not properly handled, causing incorrect 404 behavior.

Changes:

  • Updated the unmatched routes handler in index.js to use router.use('*', ...) instead of router.get('*', ...).
  • Ensured all unmatched routes return a 404 response with a consistent format.

@Copilot Copilot bot review requested due to automatic review settings January 7, 2025 14:49
@TKanX TKanX self-assigned this Jan 7, 2025
@TKanX TKanX added the bug 🐛 Something isn't working label Jan 7, 2025
@TKanX TKanX merged commit cf94caf into main Jan 7, 2025
3 checks passed
@TKanX TKanX deleted the bugfix/unmatched-routes-404-handler branch January 7, 2025 14:50

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 1 out of 1 changed files in this pull request and generated no comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant