mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-28 02:18:50 +00:00
Currently, the relay logs all failed requests on WARN. This is a bit excessive because during normal operation, clients are expected to hit several 401s due to stale or missing nonces. In order to not flood the logs with these, we introduce a new type, `ResponseErrorLevel` that represents the subset of `tracing::Level` that `make_error_response` can log: - `Warn` - `Debug` Both variants mapping to the variants in `tracing::Level` with the same name, and the function will log accordingly. So now the caller can pick what level of error is meant to be used and reduce the noise on the logs when it's meant to be part of normal operation. Fixes: #5490. --------- Co-authored-by: conectado <gabrielalejandro7@gmail.com>