JWT logging improvements (#5823)

* lower level on auth success from info to debug (fixes #5820)
* don't log stacktraces on auth errors (as requested on slack). we do this by introducing an `AuthError` type instead of using `anyhow` and `bail`.
* return errors that have been censored for improved security.
This commit is contained in:
Arpad Müller
2023-11-08 17:56:53 +01:00
committed by GitHub
parent e9b227a11e
commit ea118a238a
10 changed files with 105 additions and 75 deletions

View File

@@ -1671,6 +1671,8 @@ where
);
match handle.await {
// TODO: never actually return Err from here, always Ok(...) so that we can log
// spanned errors. Call api_error_handler instead and return appropriate Body.
Ok(result) => result,
Err(e) => {
// The handler task panicked. We have a global panic handler that logs the