Skip to content

Commit 40a9202

Browse files
committed
Handle in-memory storage errors in gRPC
1 parent 8303839 commit 40a9202

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎crates/grpc/src/error.rs‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,15 @@ impl From<storage::error::StorageError> for GrpcError {
135135
StorageError::RocksDbFlush { source: _ } => GrpcError::Internal {
136136
message: "flush error".to_string(),
137137
},
138+
StorageError::InMemoryLock {} => GrpcError::Internal {
139+
message: "failed to lock in-memory storage".to_string(),
140+
},
141+
StorageError::InMemoryCheckpoint { msg } => GrpcError::Internal {
142+
message: format!("in-memory checkpoint error: {}", msg),
143+
},
144+
StorageError::InMemoryCheckpointIo { msg, source: _ } => GrpcError::Internal {
145+
message: format!("in-memory checkpoint io error: {}", msg),
146+
},
138147
}
139148
}
140149
}

0 commit comments

Comments
 (0)