Skip to content

Conversation

@DMwangnima
Copy link
Contributor

@DMwangnima DMwangnima commented Nov 3, 2025

What type of PR is this?

optimize

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.
  • Attach the PR updating the user documentation if the current PR requires user awareness at the usage level. User docs repo

(Optional) Translate the PR title into Chinese.

(Optional) More detailed description for this PR(en: English/zh: Chinese).

en:
Users often do not proactively set 404/405 handlers via engine.NoRoute and engine.NoMethod, resulting in monitoring/logging being unable to obtain valid handler information through RequestContext.HandlerName.
Adding default NoRoute and NoMethod handlers provides valid handler information, enabling more effective troubleshooting.
zh(optional):
用户往往不会主动通过 engine.NoRoute 和 engine.NoMethod 设置 404/405 的 Handler,导致监控/打点通过 RequestContext.HandlerName 无法获取到有效的 Handler 信息。
添加默认的 NoRoute 和 NoMethod Handler 来提供有效的 Handler 信息,从而更好地排查问题。

(Optional) Which issue(s) this PR fixes:

(Optional) The PR that updates user documentation:

@DMwangnima DMwangnima requested review from a team as code owners November 3, 2025 03:20
@DMwangnima DMwangnima changed the title optimize: add default NoRoute and NoMethod handles to assist troubleshooting optimize: add default NoRoute and NoMethod handlers to assist troubleshooting Nov 3, 2025
@codecov
Copy link

codecov bot commented Nov 3, 2025

Codecov Report

❌ Patch coverage is 75.00000% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.96%. Comparing base (b2a99fc) to head (5adefb3).
⚠️ Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
pkg/route/engine.go 75.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1447      +/-   ##
===========================================
+ Coverage    74.16%   74.96%   +0.80%     
===========================================
  Files          147      147              
  Lines        16988    14198    -2790     
===========================================
- Hits         12599    10644    -1955     
+ Misses        3794     2958     -836     
- Partials       595      596       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant