-
-
Notifications
You must be signed in to change notification settings - Fork 17
Closed
Description
In case of adding this filter:
Filters: []slogecho.Filter{slogecho.IgnoreStatus(200)},
When we just return an error without changing status c.Respnse().Status is 200
But inside logger we have the following:
var httpErr *echo.HTTPError
if err != nil && errors.As(err, &httpErr) {
status = httpErr.Code
if msg, ok := httpErr.Message.(string); ok {
errMsg = errors.New(msg)
}
}
.....
for _, filter := range config.Filters {
if !filter(c) { // <- here we pass old status 200
return
}
}
Metadata
Metadata
Assignees
Labels
No labels