Skip to content

Conversation

@aldas
Copy link
Contributor

@aldas aldas commented Feb 23, 2023

Fix group.RouteNotFound not working when group has attached middlewares.

Problems is/was that g.Use registers special catch all routes with g.Any and those routes have priority over route registered by g.NotFoundHandler.
Solution is to register these special routes also with NotFoundHandler so if you register custom one - it will override special catch all.

Fixes #2401
For history sake: somewhat relates to #1981 , #2256 , #1728

@aldas aldas requested a review from lammel February 23, 2023 19:21
@aldas
Copy link
Contributor Author

aldas commented Feb 23, 2023

@lammel please review.

@codecov
Copy link

codecov bot commented Feb 23, 2023

Codecov Report

Base: 92.84% // Head: 92.84% // No change to project coverage 👍

Coverage data is based on head (35a7f4d) compared to base (47844c9).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@ Coverage Diff @@ ## master #2411 +/- ## ======================================= Coverage 92.84% 92.84% ======================================= Files 39 39 Lines 4503 4503 ======================================= Hits 4181 4181 Misses 234 234 Partials 88 88 
Impacted Files Coverage Δ
group.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@aldas aldas mentioned this pull request Feb 24, 2023
3 tasks
@aldas
Copy link
Contributor Author

aldas commented Feb 27, 2023

@lammel ping

@aldas aldas merged commit ec642f7 into labstack:master Mar 2, 2023
@lammel
Copy link
Contributor

lammel commented Mar 2, 2023

Sorry, late to the party.
For history sake: LGTM

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

Labels

None yet

2 participants