samber / slog-fiber

🚨 Fiber middleware for slog logger
https://pkg.go.dev/github.com/samber/slog-fiber
MIT License
57 stars 9 forks source link

Prevent middleware for replace response when applying filters #16

Closed jippi closed 8 months ago

jippi commented 8 months ago

If a Filter applies, the response is replaced with a 200 OK instead of the actual response.

This change ensures the original err is returned when logging is being filtered, which will not affect the response body or response code.

Observed with

github.com/gofiber/fiber/v2 v2.50.0
samber commented 8 months ago

Thanks for the fix. Let's merge.