mirror of
https://github.com/zhaofengli/attic.git
synced 2025-03-13 12:19:15 +00:00
server/error: Log certain errors on error level
This commit is contained in:
parent
d6c4d883f8
commit
b25ae9f777
1 changed files with 4 additions and 1 deletions
|
@ -156,7 +156,10 @@ impl From<super::access::Error> for ServerError {
|
|||
|
||||
impl IntoResponse for ServerError {
|
||||
fn into_response(self) -> Response {
|
||||
tracing::warn!("{:?}", self);
|
||||
// TODO: Better logging control
|
||||
if matches!(self, Self::DatabaseError(_) | Self::RemoteFileError(_) | Self::ManifestSerializationError(_) | Self::AtticError(_)) {
|
||||
tracing::error!("{:?}", self);
|
||||
}
|
||||
|
||||
// TODO: don't sanitize in dev mode
|
||||
let sanitized = self.into_clients();
|
||||
|
|
Loading…
Add table
Reference in a new issue