return after errorHandler

Signed-off-by: Vasiliy Tolstov <v.tolstov@unistack.org>
This commit is contained in:
Василий Толстов 2023-02-05 11:29:51 +03:00
parent b925441ea7
commit b5148e90cb

View File

@ -117,6 +117,7 @@ func (h *httpServer) ServeHTTP(w http.ResponseWriter, r *http.Request) {
break
} else if err == rhttp.ErrMethodNotAllowed && !h.registerRPC {
h.errorHandler(ctx, nil, w, r, fmt.Errorf("not matching route found"), http.StatusNotFound)
return
}
}