internal/server: Log unknown errors
This commit updates the server code to log unknown errors to the console.
This commit is contained in:
parent
751f5a6074
commit
2ee8dfaaec
3 changed files with 9 additions and 3 deletions
|
|
@ -121,3 +121,9 @@ func (server *Server) csrf() func(http.Handler) http.Handler {
|
|||
opts = append(opts, csrf.FieldName(CSRFCookieField))
|
||||
return csrf.Protect(server.Config.CSRFSecret(), opts...)
|
||||
}
|
||||
|
||||
func init() {
|
||||
httpx.InterceptorOnFallback = func(req *http.Request, err error) {
|
||||
zerolog.Ctx(req.Context()).Err(err).Msg("unknown error intercepted")
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue