fix: check for NotFound error at the correct site in OperatorExt::async_reader_if_exists

This commit is contained in:
2026-04-22 00:27:11 -04:00
parent 4dae5bac7a
commit bb96724454

View File

@@ -15,8 +15,9 @@ impl Operator {
&self, &self,
path: &str, path: &str,
) -> Result<Option<FuturesAsyncReader>, Error> { ) -> Result<Option<FuturesAsyncReader>, Error> {
match self.reader(path).await { let reader = self.reader(path).await?;
Ok(reader) => Ok(Some(reader.into_futures_async_read(..).await?)), match reader.into_futures_async_read(..).await {
Ok(reader) => Ok(Some(reader)),
Err(error) if matches!(error.kind(), ErrorKind::NotFound) => Ok(None), Err(error) if matches!(error.kind(), ErrorKind::NotFound) => Ok(None),
Err(error) => Err(error), Err(error) => Err(error),
} }