souin middleware doesn't support best practice for error handling in caddy cache handler
Hi, After consulting with Caddy community about error handling best practices, the souin middleware used by https://github.com/caddyserver/cache-handler, can follow the best practices? Here is the community discussion: https://caddy.community/t/best-practices-for-handling-errors-in-chain-of-custom-modules/31101
In this code: https://github.com/darkweak/souin/blob/master/pkg/middleware/middleware.go#L976-L981
we can see the middleware write bytes and not return nil or HandlerError, which does not follow the best practices (which means the chain will continue to the next middleware, and it's body response ("Internal server error" string) will be flushed to the next middlewares in the chain, which can cause unexpected behavior).
Hi, i also experience this issue.
I'd really like an update when this ticket will be addressed, important topic to my team
Following this as well.