mirror of
https://github.com/scottlamb/moonfire-nvr.git
synced 2025-12-08 00:32:26 -05:00
improve some error logs
...in particular, pass the error as a tracing param rather than directly in the main error message. The new behavior is nicer with e.g. OpenTelemetry.
This commit is contained in:
@@ -638,13 +638,13 @@ impl Service {
|
||||
}),
|
||||
})
|
||||
}
|
||||
Err(e) if e.kind() == base::ErrorKind::Unauthenticated => {
|
||||
Err(err) if err.kind() == base::ErrorKind::Unauthenticated => {
|
||||
// Log the specific reason this session is unauthenticated.
|
||||
// Don't let the API client see it, as it may have a
|
||||
// revocation reason that isn't for their eyes.
|
||||
warn!("Session authentication failed: {e}");
|
||||
warn!(err = %err.chain(), "session authentication failed");
|
||||
}
|
||||
Err(e) => return Err(e),
|
||||
Err(err) => return Err(err),
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user