feat: silence context expired errors
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good

closes #49
This commit is contained in:
wpetit 2025-03-10 18:32:36 +01:00
parent ac7b7e8189
commit 6a4a144c97

View File

@ -233,9 +233,7 @@ func (s *Server) handleDefault(w http.ResponseWriter, r *http.Request) {
func (s *Server) handleError(w http.ResponseWriter, r *http.Request, status int, err error) {
err = errors.WithStack(err)
if errors.Is(err, context.Canceled) {
logger.Warn(r.Context(), err.Error(), logger.E(err))
} else {
if !errors.Is(err, context.Canceled) {
logger.Error(r.Context(), err.Error(), logger.CapturedE(err))
}