Refactor errors

This commit is contained in:
2026-03-12 23:04:59 -07:00
parent 60483dd53d
commit 26a428dedc
17 changed files with 192 additions and 161 deletions

View File

@@ -7,6 +7,12 @@ pub trait ObjectExtractor: Send + Sync {
/// Get the field at `name` from `item`.
/// - returns `None` if `name` is not a valid field
/// - returns `Some(Null)` if `name` is not available
///
/// For extractors that parse binary, this fn should return
/// an error only if we failed to obtain the data we need (permission denied, etc).
///
/// If the underlying data has an invalid format (e.g, running a pdf extractor on a non-pdf file),
/// this fn should return `Ok(Some(None))`.
async fn field(
&self,
name: &pile_config::Label,