From c13263fe0d5cd601b693013bb350468b8ee32c7c Mon Sep 17 00:00:00 2001 From: loveuer Date: Mon, 17 Jun 2024 14:31:49 +0800 Subject: [PATCH] fix: logger missing status while 404 --- app.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/app.go b/app.go index 8dc5930..e6c2a93 100644 --- a/app.go +++ b/app.go @@ -202,17 +202,19 @@ func (a *App) handleHTTPRequest(c *Ctx) { } if len(allowed) > 0 { - c.handlers = a.combineHandlers() + c.handlers = a.combineHandlers(a.config.MethodNotAllowedHandler) - serveError(c, a.config.MethodNotAllowedHandler) + _ = c.Next() return } } - c.handlers = a.combineHandlers() + c.handlers = a.combineHandlers(a.config.NotFoundHandler) - serveError(c, a.config.NotFoundHandler) + _ = c.Next() + + return } func errorHandler(c *Ctx) error {