From 6e107bc89774fa59a1f1ffa57efbbe702f56dfeb Mon Sep 17 00:00:00 2001 From: Vishal Rana Date: Thu, 29 Dec 2016 08:19:52 -0800 Subject: [PATCH] Not sending internal errors Signed-off-by: Vishal Rana --- echo.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/echo.go b/echo.go index 23868515..92bbf1f5 100644 --- a/echo.go +++ b/echo.go @@ -289,9 +289,9 @@ func (e *Echo) DefaultHTTPErrorHandler(err error, c Context) { code = he.Code msg = he.Message } else { - msg = err.Error() + msg = http.StatusText(code) } - if reflect.TypeOf(msg).Kind() != reflect.Ptr { + if _, ok := msg.(string); ok { msg = Map{"message": msg} }