Description
DebugProbeMiddleware currently skips requests when context.GetEndpoint() returns null.
As a result, legitimate 404 requests are not captured or displayed in DebugProbe.
Because ASP.NET Core does not resolve endpoints for missing routes, unmatched requests bypass DebugProbe storage entirely.
Expected Behavior
404 requests should still be captured and visible in the DebugProbe UI.
This is important because:
- debugging missing routes is a common scenario
- developers often need visibility into invalid requests
- monitoring unexpected traffic is useful
- APIs frequently receive malformed or outdated routes
Suggested Fix
Remove the early return based on GetEndpoint():
var endpoint = context.GetEndpoint();
if (endpoint is null)
{
await _next(context);
return;
}
The middleware should continue processing requests even when no endpoint is matched.
Result
After removing this condition:
- 404 requests are correctly captured
- middleware behavior becomes more consistent
- DebugProbe provides better real-world diagnostics
Description
DebugProbeMiddleware currently skips requests when
context.GetEndpoint()returnsnull.As a result, legitimate 404 requests are not captured or displayed in DebugProbe.
Because ASP.NET Core does not resolve endpoints for missing routes, unmatched requests bypass DebugProbe storage entirely.
Expected Behavior
404 requests should still be captured and visible in the DebugProbe UI.
This is important because:
Suggested Fix
Remove the early return based on
GetEndpoint():The middleware should continue processing requests even when no endpoint is matched.
Result
After removing this condition: