From 16ea60f2aa36c50573f90ccc3ce529c3298489a9 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Wed, 1 May 2019 16:20:32 +0200 Subject: [PATCH] fix: add data to 'ErrorUncallableMethod' and 'ErrorUncallableService' --- server.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/server.go b/server.go index 9ab6d85..d90a10a 100644 --- a/server.go +++ b/server.go @@ -106,10 +106,16 @@ func (s *Server) ServeHTTP(res http.ResponseWriter, req *http.Request) { // fail if found no handler if serviceHandler == nil { if serviceFound { - httpError(res, api.ErrorUncallableMethod()) + apiError := api.ErrorUncallableMethod() + apiError.Put(servicePath) + apiError.Put(req.Method) + httpError(res, apiError) return } - httpError(res, api.ErrorUncallableService()) + + apiError := api.ErrorUncallableService() + apiError.Put(servicePath) + httpError(res, apiError) return }