0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2025-01-13 22:51:08 -05:00

Fixes crash if logging error is not HandlerError

This commit is contained in:
Omar Ramadan 2025-01-08 12:35:18 -08:00
parent e48b75843b
commit 68d1d1b003

View file

@ -211,6 +211,11 @@ func errLogValues(err error) (status int, msg string, fields func() []zapcore.Fi
}
return
}
fields = func() []zapcore.Field {
return []zapcore.Field{
zap.Error(err),
}
}
status = http.StatusInternalServerError
msg = err.Error()
return