diff --git a/giterated-daemon/src/database_backend/mod.rs b/giterated-daemon/src/database_backend/mod.rs index c6c52df..9c8d8a5 100644 --- a/giterated-daemon/src/database_backend/mod.rs +++ b/giterated-daemon/src/database_backend/mod.rs @@ -105,7 +105,11 @@ impl ObjectBackend for DatabaseBackend { Ok(result) => Ok(serde_json::from_slice(&result) .map_err(|e| OperationError::Internal(e.to_string()))?), Err(err) => match err { - OperationError::Internal(internal) => Err(OperationError::Internal(internal)), + OperationError::Internal(internal) => { + warn!("Internal Error: {:?}", OperationError::<()>::Internal(internal.clone())); + + Err(OperationError::Internal(internal)) + }, OperationError::Unhandled => Err(OperationError::Unhandled), OperationError::Operation(err) => Err(OperationError::Operation( serde_json::from_slice(&err) @@ -137,7 +141,11 @@ impl ObjectBackend for DatabaseBackend { Ok(result) => Ok(serde_json::from_slice(&result) .map_err(|e| OperationError::Internal(e.to_string()))?), Err(err) => match err { - OperationError::Internal(internal) => Err(OperationError::Internal(internal)), + OperationError::Internal(internal) => { + warn!("Internal Error: {:?}", OperationError::<()>::Internal(internal.clone())); + + Err(OperationError::Internal(internal)) + }, OperationError::Unhandled => Err(OperationError::Unhandled), OperationError::Operation(err) => Err(OperationError::Operation( serde_json::from_slice(&err) @@ -170,8 +178,10 @@ impl ObjectBackend for DatabaseBackend { .map_err(|e| OperationError::Internal(e.to_string()))?), Err(err) => match err { OperationError::Internal(internal) => { - Err(OperationError::Internal(internal)) - } + warn!("Internal Error: {:?}", OperationError::<()>::Internal(internal.clone())); + + Err(OperationError::Internal(internal)) + } OperationError::Unhandled => Err(OperationError::Unhandled), OperationError::Operation(err) => Err(OperationError::Operation( serde_json::from_slice(&err)