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 } }