log internal errors
parent: tbd commit: 3923b5f
Showing 1 changed file with 14 insertions and 4 deletions
giterated-daemon/src/database_backend/mod.rs
@@ -105,7 +105,11 @@ impl ObjectBackend for DatabaseBackend { | ||
105 | 105 | Ok(result) => Ok(serde_json::from_slice(&result) |
106 | 106 | .map_err(|e| OperationError::Internal(e.to_string()))?), |
107 | 107 | Err(err) => match err { |
108 | OperationError::Internal(internal) => Err(OperationError::Internal(internal)), | |
108 | OperationError::Internal(internal) => { | |
109 | warn!("Internal Error: {:?}", OperationError::<()>::Internal(internal.clone())); | |
110 | ||
111 | Err(OperationError::Internal(internal)) | |
112 | }, | |
109 | 113 | OperationError::Unhandled => Err(OperationError::Unhandled), |
110 | 114 | OperationError::Operation(err) => Err(OperationError::Operation( |
111 | 115 | serde_json::from_slice(&err) |
@@ -137,7 +141,11 @@ impl ObjectBackend for DatabaseBackend { | ||
137 | 141 | Ok(result) => Ok(serde_json::from_slice(&result) |
138 | 142 | .map_err(|e| OperationError::Internal(e.to_string()))?), |
139 | 143 | Err(err) => match err { |
140 | OperationError::Internal(internal) => Err(OperationError::Internal(internal)), | |
144 | OperationError::Internal(internal) => { | |
145 | warn!("Internal Error: {:?}", OperationError::<()>::Internal(internal.clone())); | |
146 | ||
147 | Err(OperationError::Internal(internal)) | |
148 | }, | |
141 | 149 | OperationError::Unhandled => Err(OperationError::Unhandled), |
142 | 150 | OperationError::Operation(err) => Err(OperationError::Operation( |
143 | 151 | serde_json::from_slice(&err) |
@@ -170,8 +178,10 @@ impl ObjectBackend for DatabaseBackend { | ||
170 | 178 | .map_err(|e| OperationError::Internal(e.to_string()))?), |
171 | 179 | Err(err) => match err { |
172 | 180 | OperationError::Internal(internal) => { |
173 | Err(OperationError::Internal(internal)) | |
174 | } | |
181 | warn!("Internal Error: {:?}", OperationError::<()>::Internal(internal.clone())); | |
182 | ||
183 | Err(OperationError::Internal(internal)) | |
184 | } | |
175 | 185 | OperationError::Unhandled => Err(OperationError::Unhandled), |
176 | 186 | OperationError::Operation(err) => Err(OperationError::Operation( |
177 | 187 | serde_json::from_slice(&err) |