From be31bd2bbd3c6642a46f6b282b79ceeca4b1dcf1 Mon Sep 17 00:00:00 2001 From: Yanhui Shen Date: Wed, 13 Mar 2019 16:24:04 +0800 Subject: [PATCH] Ensure custom error handler is called --- router.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/router.go b/router.go index c5d0cda4..52c56632 100644 --- a/router.go +++ b/router.go @@ -690,7 +690,7 @@ func (p *ControllerRegister) ServeHTTP(rw http.ResponseWriter, r *http.Request) // filter wrong http method if !HTTPMETHOD[r.Method] { - http.Error(rw, "Method Not Allowed", http.StatusMethodNotAllowed) + exception("405", context) goto Admin }