From 724ffb8c3a43f0fa8509a6cb30baec866152f0d9 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 9 Mar 2023 08:42:04 +0300 Subject: [PATCH] return method not allowed error Signed-off-by: Vasiliy Tolstov --- handler.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/handler.go b/handler.go index 5b2c0dc..c50ac08 100644 --- a/handler.go +++ b/handler.go @@ -117,7 +117,7 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) { handler = hdlr break } else if err == rhttp.ErrMethodNotAllowed && !h.registerRPC { - h.errorHandler(ctx, nil, w, r, fmt.Errorf("not matching route found"), http.StatusNotFound) + h.errorHandler(ctx, nil, w, r, fmt.Errorf("not matching route found"), http.StatusMethodNotAllowed) return } } -- 2.45.2