fix: check for NotFound error at the correct site in OperatorExt::async_reader_if_exists
This commit is contained in:
@@ -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),
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user