Better handling of missing block in `fd_read`
Opened this issue · 0 comments
see
parsec-cloud/libparsec/crates/client/src/workspace/transactions/fd_read.rs
Lines 113 to 115 in a68c8e2
This can typically be triggered when the file manifest contains an invalid block ID (i.e. an ID that is not present in the local storage nor on the server side, as it could be the case with a buggy or malicious client having uploaded the manifest):
parsec-cloud/libparsec/crates/client/src/workspace/store/mod.rs
Lines 435 to 448 in a68c8e2
The panic is fine in itself ("chunk not found" refers to the fact we are in local referring to some non-existing data).
The issue comes from the fact we use this "chunk not found" error for something coming from the server, instead we should return a dedicated WorkspaceFdReadError::BlockNotFound
error.