Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Add the HTTP method to the NotFoundHandler #897

Merged
merged 1 commit into from
Feb 1, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app.go
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ func New(opts Options) *App {
}
a.router.NotFoundHandler = http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
c := a.newContext(RouteInfo{}, res, req)
err := errors.Errorf("path not found: %s", req.URL.Path)
err := errors.Errorf("path not found: %s %s", req.Method, req.URL.Path)
a.ErrorHandlers.Get(404)(404, err, c)
})

Expand Down