-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
Closed
Description
Well, this code was working before:
func echoHTTPErrorHandler(err error, c echo.Context) {
switch err.(type) {
case *echo.HTTPError:
e := err.(*echo.HTTPError)
log.Printf("%d %s", e.Code, e.Message)
c.Response().WriteHeader(e.Code)
default:
log.Println(err)
}
}And even after changing c.Response().WriteHeader(e.Code) to c.NoContent(e.Code) which is a synthesized version as now I have access to echo.Context it still doesn't work.
The problem:
2016/03/19 19:40:14 404 Not Found
2016/03/19 19:40:14 http: multiple response.WriteHeader calls
And I get HTTP/1.1 200 OK instead of 404 Not Found.
Metadata
Metadata
Assignees
Labels
No labels