-
-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
caddyhttp.HandlerErr non-500 status logging #4428
Comments
I would say yes, things like We could probably log them at the |
Fixes #4428 It's best to still log handler errors at debug level so that they're hidden by default, but still accessible if additional details are necessary.
hmm ok so follow-up question (sorry if this is basic! just trying to wrap my head around the semantics here): why are unauthorized responses returned as a caddy/modules/caddyhttp/caddyauth/caddyauth.go Lines 87 to 89 in 03b5deb
versus returning it as a |
Handler errors can be recovered from via the This is particularly useful for |
ahh gotcha, that makes sense, thank you for explaining! |
(Catching up) Yeah, so 4xx errors are client errors, not errors in the server, so we don't log those specially. But I guess it makes sense in a debug mode that logging all errors, even client ones, could be useful. Thanks for bringing up the question! |
Fixes #4428 It's best to still log handler errors at debug level so that they're hidden by default, but still accessible if additional details are necessary.
Hello! Is there a reason why Caddy only logs handler errors that have 500-level status codes (see
caddy/modules/caddyhttp/server.go
Lines 263 to 265 in 124ba1b
The text was updated successfully, but these errors were encountered: