@@ -8,12 +8,16 @@ use n0_future::{io, Stream, StreamExt};
88use n0_snafu:: SpanTrace ;
99use nested_enum_utils:: common_fields;
1010use ref_cast:: RefCast ;
11- use snafu:: { Backtrace , IntoError , Snafu } ;
11+ use snafu:: { Backtrace , IntoError , ResultExt , Snafu } ;
1212
1313use super :: blobs:: { Bitfield , ExportBaoOptions } ;
1414use crate :: {
1515 api:: { blobs:: WriteProgress , ApiClient } ,
16- get:: { fsm:: DecodeError , BadRequestSnafu , GetError , GetResult , LocalFailureSnafu , Stats } ,
16+ get:: {
17+ fsm:: DecodeError ,
18+ get_error:: { BadRequestSnafu , LocalFailureSnafu } ,
19+ GetError , GetResult , Stats ,
20+ } ,
1721 protocol:: {
1822 GetManyRequest , ObserveItem , ObserveRequest , PushRequest , Request , RequestType ,
1923 MAX_MESSAGE_SIZE ,
@@ -508,7 +512,7 @@ impl Remote {
508512 let local = self
509513 . local ( content)
510514 . await
511- . map_err ( |e| LocalFailureSnafu . into_error ( e. into ( ) ) ) ?;
515+ . map_err ( |e : anyhow :: Error | LocalFailureSnafu . into_error ( e. into ( ) ) ) ?;
512516 if local. is_complete ( ) {
513517 return Ok ( Default :: default ( ) ) ;
514518 }
@@ -685,7 +689,7 @@ impl Remote {
685689 . await
686690 . map_err ( |e| LocalFailureSnafu . into_error ( e. into ( ) ) ) ?,
687691 )
688- . map_err ( |source| BadRequestSnafu . into_error ( source . into ( ) ) ) ?;
692+ . context ( BadRequestSnafu ) ?;
689693 // let mut hash_seq = LazyHashSeq::new(store.blobs().clone(), root);
690694 loop {
691695 let at_start_child = match next_child {
0 commit comments